Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: chrome/browser/ui/webui/settings/appearance_handler.cc

Issue 2426863002: MD Settings: don't allow supervised users to switch to GTK+ theme (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698