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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 Profile* profile = Profile::FromWebUI(web_ui()); | 544 Profile* profile = Profile::FromWebUI(web_ui()); |
544 PrefService* prefs = profile->GetPrefs(); | 545 PrefService* prefs = profile->GetPrefs(); |
545 | 546 |
546 ProfileSyncService* sync_service( | 547 ProfileSyncService* sync_service( |
547 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); | 548 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); |
548 if (sync_service) | 549 if (sync_service) |
549 sync_service->AddObserver(this); | 550 sync_service->AddObserver(this); |
550 OnStateChanged(); | 551 OnStateChanged(); |
551 | 552 |
552 // Create our favicon data source. | 553 // Create our favicon data source. |
553 profile->GetChromeURLDataManager()->AddDataSource( | 554 ChromeURLDataManager::AddDataSource(profile, |
554 new FaviconSource(profile, FaviconSource::FAVICON)); | 555 new FaviconSource(profile, FaviconSource::FAVICON)); |
555 | 556 |
556 default_browser_policy_.Init(prefs::kDefaultBrowserSettingEnabled, | 557 default_browser_policy_.Init(prefs::kDefaultBrowserSettingEnabled, |
557 g_browser_process->local_state(), | 558 g_browser_process->local_state(), |
558 this); | 559 this); |
559 UpdateDefaultBrowserState(); | 560 UpdateDefaultBrowserState(); |
560 | 561 |
561 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, | 562 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, |
562 content::NotificationService::AllSources()); | 563 content::NotificationService::AllSources()); |
563 #if defined(OS_CHROMEOS) | 564 #if defined(OS_CHROMEOS) |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 } | 1412 } |
1412 | 1413 |
1413 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1414 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
1414 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1415 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
1415 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1416 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
1416 web_ui()->CallJavascriptFunction( | 1417 web_ui()->CallJavascriptFunction( |
1417 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1418 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
1418 } | 1419 } |
1419 | 1420 |
1420 } // namespace options2 | 1421 } // namespace options2 |
OLD | NEW |