| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 registrar_.RemoveAll(); | 766 registrar_.RemoveAll(); |
| 767 #if defined(OS_WIN) | 767 #if defined(OS_WIN) |
| 768 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->RemoveObserver(this); | 768 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->RemoveObserver(this); |
| 769 #endif | 769 #endif |
| 770 } | 770 } |
| 771 | 771 |
| 772 void BrowserOptionsHandler::OnStateChanged() { | 772 void BrowserOptionsHandler::OnStateChanged() { |
| 773 UpdateSyncState(); | 773 UpdateSyncState(); |
| 774 } | 774 } |
| 775 | 775 |
| 776 void BrowserOptionsHandler::GoogleSigninSucceeded(const std::string& username, | 776 void BrowserOptionsHandler::GoogleSigninSucceeded(const std::string& account_id, |
| 777 const std::string& username, |
| 777 const std::string& password) { | 778 const std::string& password) { |
| 778 OnStateChanged(); | 779 OnStateChanged(); |
| 779 } | 780 } |
| 780 | 781 |
| 781 void BrowserOptionsHandler::GoogleSignedOut(const std::string& username) { | 782 void BrowserOptionsHandler::GoogleSignedOut(const std::string& account_id, |
| 783 const std::string& username) { |
| 782 OnStateChanged(); | 784 OnStateChanged(); |
| 783 } | 785 } |
| 784 | 786 |
| 785 void BrowserOptionsHandler::PageLoadStarted() { | 787 void BrowserOptionsHandler::PageLoadStarted() { |
| 786 page_initialized_ = false; | 788 page_initialized_ = false; |
| 787 } | 789 } |
| 788 | 790 |
| 789 void BrowserOptionsHandler::InitializeHandler() { | 791 void BrowserOptionsHandler::InitializeHandler() { |
| 790 Profile* profile = Profile::FromWebUI(web_ui()); | 792 Profile* profile = Profile::FromWebUI(web_ui()); |
| 791 PrefService* prefs = profile->GetPrefs(); | 793 PrefService* prefs = profile->GetPrefs(); |
| (...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1860 extension = extensions::GetExtensionOverridingProxy( | 1862 extension = extensions::GetExtensionOverridingProxy( |
| 1861 Profile::FromWebUI(web_ui())); | 1863 Profile::FromWebUI(web_ui())); |
| 1862 AppendExtensionData("proxy", extension, &extension_controlled); | 1864 AppendExtensionData("proxy", extension, &extension_controlled); |
| 1863 | 1865 |
| 1864 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", | 1866 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", |
| 1865 extension_controlled); | 1867 extension_controlled); |
| 1866 #endif // defined(OS_WIN) | 1868 #endif // defined(OS_WIN) |
| 1867 } | 1869 } |
| 1868 | 1870 |
| 1869 } // namespace options | 1871 } // namespace options |
| OLD | NEW |