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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 NOTREACHED(); | 1346 NOTREACHED(); |
1347 return; | 1347 return; |
1348 } | 1348 } |
1349 | 1349 |
1350 base::FilePath file_path; | 1350 base::FilePath file_path; |
1351 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { | 1351 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { |
1352 NOTREACHED(); | 1352 NOTREACHED(); |
1353 return; | 1353 return; |
1354 } | 1354 } |
1355 | 1355 |
1356 helper::DeleteProfileAtPath(file_path, web_ui()); | 1356 profiles::helper::DeleteProfileAtPath(file_path, web_ui()); |
1357 } | 1357 } |
1358 | 1358 |
1359 void BrowserOptionsHandler::ObserveThemeChanged() { | 1359 void BrowserOptionsHandler::ObserveThemeChanged() { |
1360 Profile* profile = Profile::FromWebUI(web_ui()); | 1360 Profile* profile = Profile::FromWebUI(web_ui()); |
1361 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); | 1361 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); |
1362 bool is_system_theme = false; | 1362 bool is_system_theme = false; |
1363 | 1363 |
1364 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1364 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
1365 bool profile_is_supervised = profile->IsSupervised(); | 1365 bool profile_is_supervised = profile->IsSupervised(); |
1366 is_system_theme = theme_service->UsingSystemTheme(); | 1366 is_system_theme = theme_service->UsingSystemTheme(); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 | 2119 |
2120 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2120 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2121 #if defined(OS_CHROMEOS) | 2121 #if defined(OS_CHROMEOS) |
2122 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2122 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2123 #else | 2123 #else |
2124 return true; | 2124 return true; |
2125 #endif | 2125 #endif |
2126 } | 2126 } |
2127 | 2127 |
2128 } // namespace options | 2128 } // namespace options |
OLD | NEW |