OLD | NEW |
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 is_dirty_ = false; | 125 is_dirty_ = false; |
126 } | 126 } |
127 | 127 |
128 private: | 128 private: |
129 bool using_native_theme_; | 129 bool using_native_theme_; |
130 bool using_default_theme_; | 130 bool using_default_theme_; |
131 scoped_refptr<const extensions::Extension> theme_extension_; | 131 scoped_refptr<const extensions::Extension> theme_extension_; |
132 bool is_dirty_; | 132 bool is_dirty_; |
133 }; | 133 }; |
134 | 134 |
135 ProfileKeyedService* BuildMockThemeService(content::BrowserContext* profile) { | 135 BrowserContextKeyedService* BuildMockThemeService( |
| 136 content::BrowserContext* profile) { |
136 return new FakeThemeService; | 137 return new FakeThemeService; |
137 } | 138 } |
138 | 139 |
139 scoped_refptr<extensions::Extension> MakeThemeExtension( | 140 scoped_refptr<extensions::Extension> MakeThemeExtension( |
140 const base::FilePath& extension_path, | 141 const base::FilePath& extension_path, |
141 const string& name, | 142 const string& name, |
142 extensions::Manifest::Location location, | 143 extensions::Manifest::Location location, |
143 const string& update_url) { | 144 const string& update_url) { |
144 DictionaryValue source; | 145 DictionaryValue source; |
145 source.SetString(extension_manifest_keys::kName, name); | 146 source.SetString(extension_manifest_keys::kName, name); |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 608 |
608 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { | 609 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { |
609 // Set up theme service to use custom theme that was installed by policy. | 610 // Set up theme service to use custom theme that was installed by policy. |
610 fake_theme_service_->SetTheme(theme_extension_.get()); | 611 fake_theme_service_->SetTheme(theme_extension_.get()); |
611 | 612 |
612 syncer::SyncDataList data_list = | 613 syncer::SyncDataList data_list = |
613 theme_sync_service_->GetAllSyncData(syncer::THEMES); | 614 theme_sync_service_->GetAllSyncData(syncer::THEMES); |
614 | 615 |
615 ASSERT_EQ(0u, data_list.size()); | 616 ASSERT_EQ(0u, data_list.size()); |
616 } | 617 } |
OLD | NEW |