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

Side by Side Diff: chrome/browser/sync/test/integration/themes_helper.cc

Issue 244893004: Improve some naming (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and ShouldInitWithSystemTheme Created 6 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sync/test/integration/themes_helper.h" 5 #include "chrome/browser/sync/test/integration/themes_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" 9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
10 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" 10 #include "chrome/browser/sync/test/integration/sync_extension_helper.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 bool UsingCustomTheme(Profile* profile) { 42 bool UsingCustomTheme(Profile* profile) {
43 return GetThemeID(profile) != ThemeService::kDefaultThemeID; 43 return GetThemeID(profile) != ThemeService::kDefaultThemeID;
44 } 44 }
45 45
46 bool UsingDefaultTheme(Profile* profile) { 46 bool UsingDefaultTheme(Profile* profile) {
47 return GetThemeService(profile)->UsingDefaultTheme(); 47 return GetThemeService(profile)->UsingDefaultTheme();
48 } 48 }
49 49
50 bool UsingNativeTheme(Profile* profile) { 50 bool UsingSystemTheme(Profile* profile) {
51 return GetThemeService(profile)->UsingNativeTheme(); 51 return GetThemeService(profile)->UsingSystemTheme();
52 } 52 }
53 53
54 bool ThemeIsPendingInstall(Profile* profile, const std::string& id) { 54 bool ThemeIsPendingInstall(Profile* profile, const std::string& id) {
55 return SyncExtensionHelper::GetInstance()-> 55 return SyncExtensionHelper::GetInstance()->
56 IsExtensionPendingInstallForSync(profile, id); 56 IsExtensionPendingInstallForSync(profile, id);
57 } 57 }
58 58
59 bool HasOrWillHaveCustomTheme(Profile* profile, const std::string& id) { 59 bool HasOrWillHaveCustomTheme(Profile* profile, const std::string& id) {
60 return (GetThemeID(profile) == id) || ThemeIsPendingInstall(profile, id); 60 return (GetThemeID(profile) == id) || ThemeIsPendingInstall(profile, id);
61 } 61 }
62 62
63 void UseCustomTheme(Profile* profile, int index) { 63 void UseCustomTheme(Profile* profile, int index) {
64 SyncExtensionHelper::GetInstance()->InstallExtension( 64 SyncExtensionHelper::GetInstance()->InstallExtension(
65 profile, MakeName(index), extensions::Manifest::TYPE_THEME); 65 profile, MakeName(index), extensions::Manifest::TYPE_THEME);
66 } 66 }
67 67
68 void UseDefaultTheme(Profile* profile) { 68 void UseDefaultTheme(Profile* profile) {
69 GetThemeService(profile)->UseDefaultTheme(); 69 GetThemeService(profile)->UseDefaultTheme();
70 } 70 }
71 71
72 void UseNativeTheme(Profile* profile) { 72 void UseSystemTheme(Profile* profile) {
73 // TODO(akalin): Fix this inconsistent naming in the theme service. 73 GetThemeService(profile)->UseSystemTheme();
74 GetThemeService(profile)->SetNativeTheme();
75 } 74 }
76 75
77 } // namespace themes_helper 76 } // namespace themes_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698