OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test/live_sync/live_themes_sync_test.h" | 5 #include "chrome/test/live_sync/live_themes_sync_test.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/extensions/extensions_service.h" | 10 #include "chrome/browser/extensions/extensions_service.h" |
11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/themes/browser_theme_provider.h" | 12 #include "chrome/browser/themes/browser_theme_provider.h" |
13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
14 | 14 |
15 LiveThemesSyncTest::LiveThemesSyncTest(TestType test_type) | 15 LiveThemesSyncTest::LiveThemesSyncTest(TestType test_type) |
16 : LiveExtensionsSyncTestBase(test_type) {} | 16 : LiveExtensionsSyncTestBase(test_type) {} |
17 | 17 |
18 LiveThemesSyncTest::~LiveThemesSyncTest() {} | 18 LiveThemesSyncTest::~LiveThemesSyncTest() {} |
19 | 19 |
20 void LiveThemesSyncTest::SetTheme( | 20 void LiveThemesSyncTest::SetTheme( |
21 Profile* profile, scoped_refptr<Extension> theme) { | 21 Profile* profile, scoped_refptr<Extension> theme) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 profile->GetExtensionsService()->pending_extensions(); | 56 profile->GetExtensionsService()->pending_extensions(); |
57 return pending_extensions.find(extension->id()) != pending_extensions.end(); | 57 return pending_extensions.find(extension->id()) != pending_extensions.end(); |
58 } | 58 } |
59 | 59 |
60 bool LiveThemesSyncTest::HasOrWillHaveCustomTheme( | 60 bool LiveThemesSyncTest::HasOrWillHaveCustomTheme( |
61 Profile* profile, const Extension* theme) { | 61 Profile* profile, const Extension* theme) { |
62 return | 62 return |
63 (GetCustomTheme(profile) == theme) || | 63 (GetCustomTheme(profile) == theme) || |
64 ExtensionIsPendingInstall(profile, theme); | 64 ExtensionIsPendingInstall(profile, theme); |
65 } | 65 } |
OLD | NEW |