Chromium Code Reviews| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 | 87 |
| 88 bool UsingSystemTheme() const override { return using_system_theme_; } | 88 bool UsingSystemTheme() const override { return using_system_theme_; } |
| 89 | 89 |
| 90 string GetThemeID() const override { | 90 string GetThemeID() const override { |
| 91 if (theme_extension_.get()) | 91 if (theme_extension_.get()) |
| 92 return theme_extension_->id(); | 92 return theme_extension_->id(); |
| 93 else | 93 else |
| 94 return std::string(); | 94 return std::string(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 // KeyedService: | |
| 98 void Shutdown() override {} | |
|
Lei Zhang
2015/03/13 03:21:07
Is this needed?
limasdf
2015/03/13 04:51:34
Removed. No need now.
| |
| 99 | |
| 97 const extensions::Extension* theme_extension() const { | 100 const extensions::Extension* theme_extension() const { |
| 98 return theme_extension_.get(); | 101 return theme_extension_.get(); |
| 99 } | 102 } |
| 100 | 103 |
| 101 bool is_dirty() const { | 104 bool is_dirty() const { |
| 102 return is_dirty_; | 105 return is_dirty_; |
| 103 } | 106 } |
| 104 | 107 |
| 105 void MarkClean() { | 108 void MarkClean() { |
| 106 is_dirty_ = false; | 109 is_dirty_ = false; |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 | 655 |
| 653 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { | 656 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { |
| 654 // Set up theme service to use custom theme that was installed by policy. | 657 // Set up theme service to use custom theme that was installed by policy. |
| 655 fake_theme_service_->SetTheme(theme_extension_.get()); | 658 fake_theme_service_->SetTheme(theme_extension_.get()); |
| 656 | 659 |
| 657 syncer::SyncDataList data_list = | 660 syncer::SyncDataList data_list = |
| 658 theme_sync_service_->GetAllSyncData(syncer::THEMES); | 661 theme_sync_service_->GetAllSyncData(syncer::THEMES); |
| 659 | 662 |
| 660 ASSERT_EQ(0u, data_list.size()); | 663 ASSERT_EQ(0u, data_list.size()); |
| 661 } | 664 } |
| OLD | NEW |