| 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/options2/browser_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/search_engines/template_url_service_factory.h" | 41 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 42 #include "chrome/browser/service/service_process_control.h" | 42 #include "chrome/browser/service/service_process_control.h" |
| 43 #include "chrome/browser/signin/signin_manager.h" | 43 #include "chrome/browser/signin/signin_manager.h" |
| 44 #include "chrome/browser/signin/signin_manager_factory.h" | 44 #include "chrome/browser/signin/signin_manager_factory.h" |
| 45 #include "chrome/browser/sync/profile_sync_service.h" | 45 #include "chrome/browser/sync/profile_sync_service.h" |
| 46 #include "chrome/browser/sync/profile_sync_service_factory.h" | 46 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 47 #include "chrome/browser/sync/sync_ui_util.h" | 47 #include "chrome/browser/sync/sync_ui_util.h" |
| 48 #include "chrome/browser/themes/theme_service.h" | 48 #include "chrome/browser/themes/theme_service.h" |
| 49 #include "chrome/browser/themes/theme_service_factory.h" | 49 #include "chrome/browser/themes/theme_service_factory.h" |
| 50 #include "chrome/browser/ui/options/options_util.h" | 50 #include "chrome/browser/ui/options/options_util.h" |
| 51 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 51 #include "chrome/browser/ui/webui/favicon_source.h" | 52 #include "chrome/browser/ui/webui/favicon_source.h" |
| 52 #include "chrome/browser/ui/webui/web_ui_util.h" | 53 #include "chrome/browser/ui/webui/web_ui_util.h" |
| 53 #include "chrome/common/chrome_constants.h" | 54 #include "chrome/common/chrome_constants.h" |
| 54 #include "chrome/common/chrome_notification_types.h" | 55 #include "chrome/common/chrome_notification_types.h" |
| 55 #include "chrome/common/chrome_paths.h" | 56 #include "chrome/common/chrome_paths.h" |
| 56 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.h" |
| 57 #include "chrome/common/net/gaia/google_service_auth_error.h" | 58 #include "chrome/common/net/gaia/google_service_auth_error.h" |
| 58 #include "chrome/common/pref_names.h" | 59 #include "chrome/common/pref_names.h" |
| 59 #include "chrome/common/url_constants.h" | 60 #include "chrome/common/url_constants.h" |
| 60 #include "content/public/browser/browser_thread.h" | 61 #include "content/public/browser/browser_thread.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 Profile* profile = Profile::FromWebUI(web_ui()); | 541 Profile* profile = Profile::FromWebUI(web_ui()); |
| 541 PrefService* prefs = profile->GetPrefs(); | 542 PrefService* prefs = profile->GetPrefs(); |
| 542 | 543 |
| 543 ProfileSyncService* sync_service( | 544 ProfileSyncService* sync_service( |
| 544 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); | 545 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); |
| 545 if (sync_service) | 546 if (sync_service) |
| 546 sync_service->AddObserver(this); | 547 sync_service->AddObserver(this); |
| 547 OnStateChanged(); | 548 OnStateChanged(); |
| 548 | 549 |
| 549 // Create our favicon data source. | 550 // Create our favicon data source. |
| 550 profile->GetChromeURLDataManager()->AddDataSource( | 551 ChromeURLDataManager::AddDataSource(profile, |
| 551 new FaviconSource(profile, FaviconSource::FAVICON)); | 552 new FaviconSource(profile, FaviconSource::FAVICON)); |
| 552 | 553 |
| 553 default_browser_policy_.Init(prefs::kDefaultBrowserSettingEnabled, | 554 default_browser_policy_.Init(prefs::kDefaultBrowserSettingEnabled, |
| 554 g_browser_process->local_state(), | 555 g_browser_process->local_state(), |
| 555 this); | 556 this); |
| 556 UpdateDefaultBrowserState(); | 557 UpdateDefaultBrowserState(); |
| 557 | 558 |
| 558 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, | 559 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, |
| 559 content::NotificationService::AllSources()); | 560 content::NotificationService::AllSources()); |
| 560 #if defined(OS_CHROMEOS) | 561 #if defined(OS_CHROMEOS) |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 } | 1415 } |
| 1415 | 1416 |
| 1416 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1417 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
| 1417 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1418 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
| 1418 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1419 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
| 1419 web_ui()->CallJavascriptFunction( | 1420 web_ui()->CallJavascriptFunction( |
| 1420 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1421 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
| 1421 } | 1422 } |
| 1422 | 1423 |
| 1423 } // namespace options2 | 1424 } // namespace options2 |
| OLD | NEW |