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

Side by Side Diff: chrome/browser/sync/glue/theme_util_unittest.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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/sync/glue/theme_util.h" 5 #include "chrome/browser/sync/glue/theme_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 12 matching lines...) Expand all
23 using ::testing::AnyNumber; 23 using ::testing::AnyNumber;
24 using ::testing::Return; 24 using ::testing::Return;
25 25
26 class MockThemeService : public ThemeService { 26 class MockThemeService : public ThemeService {
27 public: 27 public:
28 MOCK_METHOD0(SetNativeTheme, void()); 28 MOCK_METHOD0(SetNativeTheme, void());
29 MOCK_METHOD0(UseDefaultTheme, void()); 29 MOCK_METHOD0(UseDefaultTheme, void());
30 MOCK_CONST_METHOD0(GetThemeID, std::string()); 30 MOCK_CONST_METHOD0(GetThemeID, std::string());
31 }; 31 };
32 32
33 ProfileKeyedBase* BuildMockThemeService(Profile* profile) { 33 ProfileKeyedService* BuildMockThemeService(Profile* profile) {
34 return new MockThemeService; 34 return new MockThemeService;
35 } 35 }
36 36
37 class SyncThemeUtilTest : public testing::Test { 37 class SyncThemeUtilTest : public testing::Test {
38 protected: 38 protected:
39 MockThemeService* BuildForProfile(Profile* profile) { 39 MockThemeService* BuildForProfile(Profile* profile) {
40 return static_cast<MockThemeService*>( 40 return static_cast<MockThemeService*>(
41 ThemeServiceFactory::GetInstance()->SetTestingFactoryAndUse( 41 ThemeServiceFactory::GetInstance()->SetTestingFactoryAndUse(
42 profile, BuildMockThemeService)); 42 profile, BuildMockThemeService));
43 } 43 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // TODO(akalin): Mock out call to GetPrefs() under TOOLKIT_USES_GTK. 232 // TODO(akalin): Mock out call to GetPrefs() under TOOLKIT_USES_GTK.
233 233
234 sync_pb::ThemeSpecifics theme_specifics; 234 sync_pb::ThemeSpecifics theme_specifics;
235 SetCurrentThemeFromThemeSpecificsIfNecessary(theme_specifics, 235 SetCurrentThemeFromThemeSpecificsIfNecessary(theme_specifics,
236 &profile); 236 &profile);
237 } 237 }
238 238
239 } // namespace 239 } // namespace
240 240
241 } // namespace browser_sync 241 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar.cc ('k') | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698