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

Side by Side Diff: chrome/browser/themes/theme_service.cc

Issue 335833003: Rename "managed (mode|user)" to "supervised user" (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments (+ a few other cleanups) Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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/themes/theme_service.h" 5 #include "chrome/browser/themes/theme_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/sequenced_task_runner.h" 11 #include "base/sequenced_task_runner.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/chrome_notification_types.h" 14 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/managed_mode/managed_user_theme.h"
17 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/supervised_user/supervised_user_theme.h"
18 #include "chrome/browser/themes/browser_theme_pack.h" 18 #include "chrome/browser/themes/browser_theme_pack.h"
19 #include "chrome/browser/themes/custom_theme_supplier.h" 19 #include "chrome/browser/themes/custom_theme_supplier.h"
20 #include "chrome/browser/themes/theme_properties.h" 20 #include "chrome/browser/themes/theme_properties.h"
21 #include "chrome/browser/themes/theme_syncable_service.h" 21 #include "chrome/browser/themes/theme_syncable_service.h"
22 #include "chrome/common/chrome_constants.h" 22 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "content/public/browser/user_metrics.h" 25 #include "content/public/browser/user_metrics.h"
26 #include "extensions/browser/extension_prefs.h" 26 #include "extensions/browser/extension_prefs.h"
27 #include "extensions/browser/extension_registry.h" 27 #include "extensions/browser/extension_registry.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 579
580 SavePackName(pack_path); 580 SavePackName(pack_path);
581 SwapThemeSupplier(pack); 581 SwapThemeSupplier(pack);
582 } 582 }
583 583
584 bool ThemeService::IsSupervisedUser() const { 584 bool ThemeService::IsSupervisedUser() const {
585 return profile_->IsSupervised(); 585 return profile_->IsSupervised();
586 } 586 }
587 587
588 void ThemeService::SetSupervisedUserTheme() { 588 void ThemeService::SetSupervisedUserTheme() {
589 SetCustomDefaultTheme(new ManagedUserTheme); 589 SetCustomDefaultTheme(new SupervisedUserTheme);
590 } 590 }
591 591
592 void ThemeService::OnInfobarDisplayed() { 592 void ThemeService::OnInfobarDisplayed() {
593 number_of_infobars_++; 593 number_of_infobars_++;
594 } 594 }
595 595
596 void ThemeService::OnInfobarDestroyed() { 596 void ThemeService::OnInfobarDestroyed() {
597 number_of_infobars_--; 597 number_of_infobars_--;
598 598
599 if (number_of_infobars_ == 0) 599 if (number_of_infobars_ == 0)
600 RemoveUnusedThemes(false); 600 RemoveUnusedThemes(false);
601 } 601 }
602 602
603 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { 603 ThemeSyncableService* ThemeService::GetThemeSyncableService() const {
604 return theme_syncable_service_.get(); 604 return theme_syncable_service_.get();
605 } 605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698