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

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

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 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) 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_syncable_service.h" 5 #include "chrome/browser/themes/theme_syncable_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 is_dirty_ = false; 119 is_dirty_ = false;
120 } 120 }
121 121
122 private: 122 private:
123 bool using_native_theme_; 123 bool using_native_theme_;
124 bool using_default_theme_; 124 bool using_default_theme_;
125 scoped_refptr<const extensions::Extension> theme_extension_; 125 scoped_refptr<const extensions::Extension> theme_extension_;
126 bool is_dirty_; 126 bool is_dirty_;
127 }; 127 };
128 128
129 ProfileKeyedService* BuildMockThemeService(Profile* profile) { 129 ProfileKeyedService* BuildMockThemeService(content::BrowserContext* profile) {
130 return new FakeThemeService; 130 return new FakeThemeService;
131 } 131 }
132 132
133 scoped_refptr<extensions::Extension> MakeThemeExtension( 133 scoped_refptr<extensions::Extension> MakeThemeExtension(
134 const base::FilePath& extension_path, 134 const base::FilePath& extension_path,
135 const string& name, 135 const string& name,
136 extensions::Manifest::Location location, 136 extensions::Manifest::Location location,
137 const string& update_url) { 137 const string& update_url) {
138 DictionaryValue source; 138 DictionaryValue source;
139 source.SetString(extension_manifest_keys::kName, name); 139 source.SetString(extension_manifest_keys::kName, name);
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { 596 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) {
597 // Set up theme service to use custom theme that was installed by policy. 597 // Set up theme service to use custom theme that was installed by policy.
598 fake_theme_service_->SetTheme(theme_extension_.get()); 598 fake_theme_service_->SetTheme(theme_extension_.get());
599 599
600 syncer::SyncDataList data_list = 600 syncer::SyncDataList data_list =
601 theme_sync_service_->GetAllSyncData(syncer::THEMES); 601 theme_sync_service_->GetAllSyncData(syncer::THEMES);
602 602
603 ASSERT_EQ(0u, data_list.size()); 603 ASSERT_EQ(0u, data_list.size());
604 } 604 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698