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

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

Issue 2468723003: Move session service and supervised users to buildflags. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/themes/theme_properties.h ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/threading/non_thread_safe.h" 18 #include "base/threading/non_thread_safe.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "chrome/common/features.h"
20 #include "components/keyed_service/core/keyed_service.h" 21 #include "components/keyed_service/core/keyed_service.h"
21 #include "content/public/browser/notification_observer.h" 22 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
23 #include "ui/base/theme_provider.h" 24 #include "ui/base/theme_provider.h"
24 25
25 class CustomThemeSupplier; 26 class CustomThemeSupplier;
26 class BrowserThemePack; 27 class BrowserThemePack;
27 class ThemeSyncableService; 28 class ThemeSyncableService;
28 class Profile; 29 class Profile;
29 30
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Saves the filename of the cached theme pack. 268 // Saves the filename of the cached theme pack.
268 void SavePackName(const base::FilePath& pack_path); 269 void SavePackName(const base::FilePath& pack_path);
269 270
270 // Save the id of the last theme installed. 271 // Save the id of the last theme installed.
271 void SaveThemeID(const std::string& id); 272 void SaveThemeID(const std::string& id);
272 273
273 // Implementation of SetTheme() (and the fallback from LoadThemePrefs() in 274 // Implementation of SetTheme() (and the fallback from LoadThemePrefs() in
274 // case we don't have a theme pack). 275 // case we don't have a theme pack).
275 void BuildFromExtension(const extensions::Extension* extension); 276 void BuildFromExtension(const extensions::Extension* extension);
276 277
277 #if defined(ENABLE_SUPERVISED_USERS) 278 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
278 // Returns true if the profile belongs to a supervised user. 279 // Returns true if the profile belongs to a supervised user.
279 bool IsSupervisedUser() const; 280 bool IsSupervisedUser() const;
280 281
281 // Sets the current theme to the supervised user theme. Should only be used 282 // Sets the current theme to the supervised user theme. Should only be used
282 // for supervised user profiles. 283 // for supervised user profiles.
283 void SetSupervisedUserTheme(); 284 void SetSupervisedUserTheme();
284 #endif 285 #endif
285 286
286 #if defined(OS_MACOSX) 287 #if defined(OS_MACOSX)
287 // |nsimage_cache_| retains the images it has cached. 288 // |nsimage_cache_| retains the images it has cached.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 327
327 BrowserThemeProvider original_theme_provider_; 328 BrowserThemeProvider original_theme_provider_;
328 BrowserThemeProvider incognito_theme_provider_; 329 BrowserThemeProvider incognito_theme_provider_;
329 330
330 base::WeakPtrFactory<ThemeService> weak_ptr_factory_; 331 base::WeakPtrFactory<ThemeService> weak_ptr_factory_;
331 332
332 DISALLOW_COPY_AND_ASSIGN(ThemeService); 333 DISALLOW_COPY_AND_ASSIGN(ThemeService);
333 }; 334 };
334 335
335 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ 336 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_properties.h ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698