| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "chrome/browser/signin/signin_manager_factory.h" | 53 #include "chrome/browser/signin/signin_manager_factory.h" |
| 54 #include "chrome/browser/sync/profile_sync_service_factory.h" | 54 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 55 #include "chrome/browser/sync/sync_ui_util.h" | 55 #include "chrome/browser/sync/sync_ui_util.h" |
| 56 #include "chrome/browser/themes/theme_service.h" | 56 #include "chrome/browser/themes/theme_service.h" |
| 57 #include "chrome/browser/themes/theme_service_factory.h" | 57 #include "chrome/browser/themes/theme_service_factory.h" |
| 58 #include "chrome/browser/ui/browser_finder.h" | 58 #include "chrome/browser/ui/browser_finder.h" |
| 59 #include "chrome/browser/ui/chrome_select_file_policy.h" | 59 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 60 #include "chrome/browser/ui/host_desktop.h" | 60 #include "chrome/browser/ui/host_desktop.h" |
| 61 #include "chrome/browser/ui/passwords/manage_passwords_view_utils_desktop.h" | 61 #include "chrome/browser/ui/passwords/manage_passwords_view_utils_desktop.h" |
| 62 #include "chrome/browser/ui/webui/favicon_source.h" | 62 #include "chrome/browser/ui/webui/favicon_source.h" |
| 63 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" | 63 #include "chrome/browser/ui/webui/profile_helper.h" |
| 64 #include "chrome/common/chrome_constants.h" | 64 #include "chrome/common/chrome_constants.h" |
| 65 #include "chrome/common/chrome_paths.h" | 65 #include "chrome/common/chrome_paths.h" |
| 66 #include "chrome/common/chrome_switches.h" | 66 #include "chrome/common/chrome_switches.h" |
| 67 #include "chrome/common/extensions/extension_constants.h" | 67 #include "chrome/common/extensions/extension_constants.h" |
| 68 #include "chrome/common/pref_names.h" | 68 #include "chrome/common/pref_names.h" |
| 69 #include "chrome/common/url_constants.h" | 69 #include "chrome/common/url_constants.h" |
| 70 #include "chrome/grit/chromium_strings.h" | 70 #include "chrome/grit/chromium_strings.h" |
| 71 #include "chrome/grit/generated_resources.h" | 71 #include "chrome/grit/generated_resources.h" |
| 72 #include "chrome/grit/locale_settings.h" | 72 #include "chrome/grit/locale_settings.h" |
| 73 #include "components/browser_sync/browser/profile_sync_service.h" | 73 #include "components/browser_sync/browser/profile_sync_service.h" |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 NOTREACHED(); | 1350 NOTREACHED(); |
| 1351 return; | 1351 return; |
| 1352 } | 1352 } |
| 1353 | 1353 |
| 1354 base::FilePath file_path; | 1354 base::FilePath file_path; |
| 1355 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { | 1355 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { |
| 1356 NOTREACHED(); | 1356 NOTREACHED(); |
| 1357 return; | 1357 return; |
| 1358 } | 1358 } |
| 1359 | 1359 |
| 1360 helper::DeleteProfileAtPath(file_path, web_ui()); | 1360 webui::DeleteProfileAtPath(file_path, web_ui()); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 void BrowserOptionsHandler::ObserveThemeChanged() { | 1363 void BrowserOptionsHandler::ObserveThemeChanged() { |
| 1364 Profile* profile = Profile::FromWebUI(web_ui()); | 1364 Profile* profile = Profile::FromWebUI(web_ui()); |
| 1365 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); | 1365 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); |
| 1366 bool is_system_theme = false; | 1366 bool is_system_theme = false; |
| 1367 | 1367 |
| 1368 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1368 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 1369 bool profile_is_supervised = profile->IsSupervised(); | 1369 bool profile_is_supervised = profile->IsSupervised(); |
| 1370 is_system_theme = theme_service->UsingSystemTheme(); | 1370 is_system_theme = theme_service->UsingSystemTheme(); |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 | 2126 |
| 2127 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2127 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2128 #if defined(OS_CHROMEOS) | 2128 #if defined(OS_CHROMEOS) |
| 2129 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2129 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2130 #else | 2130 #else |
| 2131 return true; | 2131 return true; |
| 2132 #endif | 2132 #endif |
| 2133 } | 2133 } |
| 2134 | 2134 |
| 2135 } // namespace options | 2135 } // namespace options |
| OLD | NEW |