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

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

Issue 355233002: Fix build when ENABLE_MANAGED_USERS is not defined (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits, minor refactoring Created 6 years, 5 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) 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 #ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_H_ 5 #ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_H_
6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_H_ 6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Saves the filename of the cached theme pack. 197 // Saves the filename of the cached theme pack.
198 void SavePackName(const base::FilePath& pack_path); 198 void SavePackName(const base::FilePath& pack_path);
199 199
200 // Save the id of the last theme installed. 200 // Save the id of the last theme installed.
201 void SaveThemeID(const std::string& id); 201 void SaveThemeID(const std::string& id);
202 202
203 // Implementation of SetTheme() (and the fallback from LoadThemePrefs() in 203 // Implementation of SetTheme() (and the fallback from LoadThemePrefs() in
204 // case we don't have a theme pack). 204 // case we don't have a theme pack).
205 void BuildFromExtension(const extensions::Extension* extension); 205 void BuildFromExtension(const extensions::Extension* extension);
206 206
207 #if defined(ENABLE_MANAGED_USERS)
207 // Returns true if the profile belongs to a supervised user. 208 // Returns true if the profile belongs to a supervised user.
208 bool IsSupervisedUser() const; 209 bool IsSupervisedUser() const;
209 210
210 // Sets the current theme to the supervised user theme. Should only be used 211 // Sets the current theme to the supervised user theme. Should only be used
211 // for supervised user profiles. 212 // for supervised user profiles.
212 void SetSupervisedUserTheme(); 213 void SetSupervisedUserTheme();
214 #endif
213 215
214 #if defined(OS_MACOSX) 216 #if defined(OS_MACOSX)
215 // |nsimage_cache_| retains the images it has cached. 217 // |nsimage_cache_| retains the images it has cached.
216 typedef std::map<int, NSImage*> NSImageMap; 218 typedef std::map<int, NSImage*> NSImageMap;
217 mutable NSImageMap nsimage_cache_; 219 mutable NSImageMap nsimage_cache_;
218 220
219 // |nscolor_cache_| retains the colors it has cached. 221 // |nscolor_cache_| retains the colors it has cached.
220 typedef std::map<int, NSColor*> NSColorMap; 222 typedef std::map<int, NSColor*> NSColorMap;
221 mutable NSColorMap nscolor_cache_; 223 mutable NSColorMap nscolor_cache_;
222 224
(...skipping 19 matching lines...) Expand all
242 content::NotificationRegistrar registrar_; 244 content::NotificationRegistrar registrar_;
243 245
244 scoped_ptr<ThemeSyncableService> theme_syncable_service_; 246 scoped_ptr<ThemeSyncableService> theme_syncable_service_;
245 247
246 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; 248 base::WeakPtrFactory<ThemeService> weak_ptr_factory_;
247 249
248 DISALLOW_COPY_AND_ASSIGN(ThemeService); 250 DISALLOW_COPY_AND_ASSIGN(ThemeService);
249 }; 251 };
250 252
251 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ 253 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698