| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/settings/appearance_handler.h" | 5 #include "chrome/browser/ui/webui/settings/appearance_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 base::Unretained(this))); | 46 base::Unretained(this))); |
| 47 #endif | 47 #endif |
| 48 } | 48 } |
| 49 | 49 |
| 50 void AppearanceHandler::HandleUseDefaultTheme(const base::ListValue* args) { | 50 void AppearanceHandler::HandleUseDefaultTheme(const base::ListValue* args) { |
| 51 ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme(); | 51 ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 54 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 55 void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) { | 55 void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) { |
| 56 ThemeServiceFactory::GetForProfile(profile_)->UseSystemTheme(); | 56 if (profile_->IsSupervised()) |
| 57 NOTREACHED(); |
| 58 else |
| 59 ThemeServiceFactory::GetForProfile(profile_)->UseSystemTheme(); |
| 57 } | 60 } |
| 58 #endif | 61 #endif |
| 59 | 62 |
| 60 #if defined(OS_CHROMEOS) | 63 #if defined(OS_CHROMEOS) |
| 61 void AppearanceHandler::HandleOpenWallpaperManager( | 64 void AppearanceHandler::HandleOpenWallpaperManager( |
| 62 const base::ListValue* /*args*/) { | 65 const base::ListValue* /*args*/) { |
| 63 ash::WmShell::Get()->wallpaper_delegate()->OpenSetWallpaperPage(); | 66 ash::WmShell::Get()->wallpaper_delegate()->OpenSetWallpaperPage(); |
| 64 } | 67 } |
| 65 #endif | 68 #endif |
| 66 | 69 |
| 67 } // namespace settings | 70 } // namespace settings |
| OLD | NEW |