| 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 | 10 |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 NOTREACHED(); | 1377 NOTREACHED(); |
| 1378 return; | 1378 return; |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 base::FilePath file_path; | 1381 base::FilePath file_path; |
| 1382 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { | 1382 if (!base::GetValueAsFilePath(*file_path_value, &file_path)) { |
| 1383 NOTREACHED(); | 1383 NOTREACHED(); |
| 1384 return; | 1384 return; |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 webui::DeleteProfileAtPath(file_path, web_ui()); | 1387 webui::DeleteProfileAtPath(file_path, |
| 1388 web_ui(), |
| 1389 ProfileMetrics::DELETE_PROFILE_SETTINGS); |
| 1388 } | 1390 } |
| 1389 | 1391 |
| 1390 void BrowserOptionsHandler::ObserveThemeChanged() { | 1392 void BrowserOptionsHandler::ObserveThemeChanged() { |
| 1391 Profile* profile = Profile::FromWebUI(web_ui()); | 1393 Profile* profile = Profile::FromWebUI(web_ui()); |
| 1392 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); | 1394 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); |
| 1393 bool is_system_theme = false; | 1395 bool is_system_theme = false; |
| 1394 | 1396 |
| 1395 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1397 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 1396 bool profile_is_supervised = profile->IsSupervised(); | 1398 bool profile_is_supervised = profile->IsSupervised(); |
| 1397 is_system_theme = theme_service->UsingSystemTheme(); | 1399 is_system_theme = theme_service->UsingSystemTheme(); |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2170 | 2172 |
| 2171 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2173 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2172 #if defined(OS_CHROMEOS) | 2174 #if defined(OS_CHROMEOS) |
| 2173 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2175 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2174 #else | 2176 #else |
| 2175 return true; | 2177 return true; |
| 2176 #endif | 2178 #endif |
| 2177 } | 2179 } |
| 2178 | 2180 |
| 2179 } // namespace options | 2181 } // namespace options |
| OLD | NEW |