Commit 3c5efa30 authored by bauerb@chromium.org's avatar bauerb@chromium.org

Don't update profile information when the sync state changes.

BUG=262104

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215883 0039d316-1c4b-4281-b951-d872f2087c98
parent 40fd7056
...@@ -655,17 +655,7 @@ void BrowserOptionsHandler::RegisterMessages() { ...@@ -655,17 +655,7 @@ void BrowserOptionsHandler::RegisterMessages() {
} }
void BrowserOptionsHandler::OnStateChanged() { void BrowserOptionsHandler::OnStateChanged() {
web_ui()->CallJavascriptFunction("BrowserOptions.updateSyncState", UpdateSyncState();
*GetSyncStateDictionary());
SendProfilesInfo();
}
void BrowserOptionsHandler::OnSigninAllowedPrefChange() {
web_ui()->CallJavascriptFunction("BrowserOptions.updateSyncState",
*GetSyncStateDictionary());
SendProfilesInfo();
} }
void BrowserOptionsHandler::PageLoadStarted() { void BrowserOptionsHandler::PageLoadStarted() {
...@@ -1458,6 +1448,15 @@ void BrowserOptionsHandler::MouseExists(bool exists) { ...@@ -1458,6 +1448,15 @@ void BrowserOptionsHandler::MouseExists(bool exists) {
} }
#endif #endif
void BrowserOptionsHandler::UpdateSyncState() {
web_ui()->CallJavascriptFunction("BrowserOptions.updateSyncState",
*GetSyncStateDictionary());
}
void BrowserOptionsHandler::OnSigninAllowedPrefChange() {
UpdateSyncState();
}
void BrowserOptionsHandler::HandleAutoOpenButton(const ListValue* args) { void BrowserOptionsHandler::HandleAutoOpenButton(const ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ResetAutoOpenFiles")); content::RecordAction(UserMetricsAction("Options_ResetAutoOpenFiles"));
DownloadManager* manager = BrowserContext::GetDownloadManager( DownloadManager* manager = BrowserContext::GetDownloadManager(
......
...@@ -59,13 +59,6 @@ class BrowserOptionsHandler ...@@ -59,13 +59,6 @@ class BrowserOptionsHandler
// ProfileSyncServiceObserver implementation. // ProfileSyncServiceObserver implementation.
virtual void OnStateChanged() OVERRIDE; virtual void OnStateChanged() OVERRIDE;
// Will be called when the kSigninAllowed pref has changed.
void OnSigninAllowedPrefChange();
// Called whenever prefs::kSearchSuggestEnabled or the default search engine
// changes, so that we can update the state of the Instant pref checkbox.
void UpdateInstantCheckboxState();
// ShellIntegration::DefaultWebClientObserver implementation. // ShellIntegration::DefaultWebClientObserver implementation.
virtual void SetDefaultWebClientUIState( virtual void SetDefaultWebClientUIState(
ShellIntegration::DefaultWebClientUIState state) OVERRIDE; ShellIntegration::DefaultWebClientUIState state) OVERRIDE;
...@@ -93,6 +86,11 @@ class BrowserOptionsHandler ...@@ -93,6 +86,11 @@ class BrowserOptionsHandler
virtual void MouseExists(bool exists) OVERRIDE; virtual void MouseExists(bool exists) OVERRIDE;
#endif #endif
void UpdateSyncState();
// Will be called when the kSigninAllowed pref has changed.
void OnSigninAllowedPrefChange();
// Makes this the default browser. Called from WebUI. // Makes this the default browser. Called from WebUI.
void BecomeDefaultBrowser(const base::ListValue* args); void BecomeDefaultBrowser(const base::ListValue* args);
......
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