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 "apps/app_window.h" | 10 #include "apps/app_window.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 : page_initialized_(false), | 166 : page_initialized_(false), |
167 template_url_service_(NULL), | 167 template_url_service_(NULL), |
168 cloud_print_mdns_ui_enabled_(false), | 168 cloud_print_mdns_ui_enabled_(false), |
169 signin_observer_(this), | 169 signin_observer_(this), |
170 weak_ptr_factory_(this) { | 170 weak_ptr_factory_(this) { |
171 #if !defined(OS_MACOSX) | 171 #if !defined(OS_MACOSX) |
172 default_browser_worker_ = new ShellIntegration::DefaultBrowserWorker(this); | 172 default_browser_worker_ = new ShellIntegration::DefaultBrowserWorker(this); |
173 #endif | 173 #endif |
174 | 174 |
175 #if defined(ENABLE_SERVICE_DISCOVERY) | 175 #if defined(ENABLE_SERVICE_DISCOVERY) |
176 cloud_print_mdns_ui_enabled_ = !CommandLine::ForCurrentProcess()->HasSwitch( | 176 cloud_print_mdns_ui_enabled_ = true; |
177 switches::kDisableDeviceDiscovery); | |
178 #endif // defined(ENABLE_SERVICE_DISCOVERY) | 177 #endif // defined(ENABLE_SERVICE_DISCOVERY) |
179 } | 178 } |
180 | 179 |
181 BrowserOptionsHandler::~BrowserOptionsHandler() { | 180 BrowserOptionsHandler::~BrowserOptionsHandler() { |
182 ProfileSyncService* sync_service(ProfileSyncServiceFactory:: | 181 ProfileSyncService* sync_service(ProfileSyncServiceFactory:: |
183 GetInstance()->GetForProfile(Profile::FromWebUI(web_ui()))); | 182 GetInstance()->GetForProfile(Profile::FromWebUI(web_ui()))); |
184 if (sync_service) | 183 if (sync_service) |
185 sync_service->RemoveObserver(this); | 184 sync_service->RemoveObserver(this); |
186 | 185 |
187 if (default_browser_worker_.get()) | 186 if (default_browser_worker_.get()) |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 extension = extensions::GetExtensionOverridingProxy( | 1865 extension = extensions::GetExtensionOverridingProxy( |
1867 Profile::FromWebUI(web_ui())); | 1866 Profile::FromWebUI(web_ui())); |
1868 AppendExtensionData("proxy", extension, &extension_controlled); | 1867 AppendExtensionData("proxy", extension, &extension_controlled); |
1869 | 1868 |
1870 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", | 1869 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", |
1871 extension_controlled); | 1870 extension_controlled); |
1872 #endif // defined(OS_WIN) | 1871 #endif // defined(OS_WIN) |
1873 } | 1872 } |
1874 | 1873 |
1875 } // namespace options | 1874 } // namespace options |
OLD | NEW |