Commit 693f18b9 authored by jackhou@chromium.org's avatar jackhou@chromium.org

Remove forceLogin flag from sync setup.

BUG=135620

Review URL: https://chromiumcodereview.appspot.com/12601017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194845 0039d316-1c4b-4281-b951-d872f2087c98
parent 77fdfb5c
......@@ -100,9 +100,7 @@ cr.define('options', function() {
/** @override */
didShowPage: function() {
var forceLogin = document.location.hash == '#forceLogin';
var result = JSON.stringify({'forceLogin': forceLogin});
chrome.send('SyncSetupAttachHandler', [result]);
chrome.send('SyncSetupShowSetupUI');
},
/** @override */
......
......@@ -25,7 +25,6 @@ SyncSetupWebUITest.prototype = {
'SyncSetupConfigure',
'SyncSetupPassphrase',
'SyncSetupPassphraseCancel',
'SyncSetupAttachHandler',
'SyncSetupShowErrorUI',
'SyncSetupShowSetupUI',
]);
......@@ -48,7 +47,7 @@ SyncSetupWebUITest.prototype = {
OptionsPage.navigateToPage('syncSetup');
}));
this.mockHandler.expects(once()).SyncSetupAttachHandler(NOT_NULL).
this.mockHandler.expects(once()).SyncSetupShowSetupUI().
will(callFunction(function() {
SyncSetupOverlay.showSyncSetupPage(
'login', {
......
......@@ -577,10 +577,6 @@ void SyncSetupHandler::RegisterMessages() {
"SyncSetupConfigure",
base::Bind(&SyncSetupHandler::HandleConfigure,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"SyncSetupAttachHandler",
base::Bind(&SyncSetupHandler::HandleAttachHandler,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"SyncSetupShowErrorUI",
base::Bind(&SyncSetupHandler::HandleShowErrorUI,
......@@ -1036,18 +1032,6 @@ void SyncSetupHandler::HandleConfigure(const ListValue* args) {
ProfileMetrics::LogProfileSyncInfo(ProfileMetrics::SYNC_CHOOSE);
}
void SyncSetupHandler::HandleAttachHandler(const ListValue* args) {
bool force_login = false;
std::string json;
if (args->GetString(0, &json) && !json.empty()) {
scoped_ptr<Value> parsed_value(base::JSONReader::Read(json));
DictionaryValue* result = static_cast<DictionaryValue*>(parsed_value.get());
result->GetBoolean("forceLogin", &force_login);
}
OpenSyncSetup(force_login);
}
void SyncSetupHandler::HandleShowErrorUI(const ListValue* args) {
DCHECK(!configuring_sync_);
......
......@@ -121,7 +121,6 @@ class SyncSetupHandler : public options::OptionsPageUIHandler,
void HandleConfigure(const base::ListValue* args);
void HandlePassphraseEntry(const base::ListValue* args);
void HandlePassphraseCancel(const base::ListValue* args);
void HandleAttachHandler(const base::ListValue* args);
void HandleShowErrorUI(const base::ListValue* args);
void HandleShowSetupUI(const base::ListValue* args);
void HandleShowSetupUIWithoutLogin(const base::ListValue* args);
......
......@@ -288,7 +288,6 @@ const char kSearchEnginesSubPage[] = "searchEngines";
const char kSearchSubPage[] = "search";
const char kSearchUsersSubPage[] = "search#Users";
const char kSyncSetupSubPage[] = "syncSetup";
const char kSyncSetupForceLoginSubPage[] = "syncSetup#forceLogin";
#if defined(OS_CHROMEOS)
const char kInternetOptionsSubPage[] = "internet";
const char kBluetoothAddDeviceSubPage[] = "bluetooth";
......
......@@ -277,7 +277,6 @@ extern const char kPasswordManagerSubPage[];
extern const char kSearchEnginesSubPage[];
extern const char kSearchSubPage[];
extern const char kSearchUsersSubPage[];
extern const char kSyncSetupForceLoginSubPage[];
extern const char kSyncSetupSubPage[];
#if defined(OS_CHROMEOS)
extern const char kInternetOptionsSubPage[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment