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

Side by Side Diff: chrome/browser/sync/test/integration/themes_helper.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/integration/themes_helper.h" 5 #include "chrome/browser/sync/test/integration/themes_helper.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 bool ThemePendingInstallChecker::IsExitConditionSatisfied() { 125 bool ThemePendingInstallChecker::IsExitConditionSatisfied() {
126 return ThemeIsPendingInstall(profile_, theme_); 126 return ThemeIsPendingInstall(profile_, theme_);
127 } 127 }
128 128
129 void ThemePendingInstallChecker::Observe( 129 void ThemePendingInstallChecker::Observe(
130 int type, 130 int type,
131 const content::NotificationSource& source, 131 const content::NotificationSource& source,
132 const content::NotificationDetails& details) { 132 const content::NotificationDetails& details) {
133 DCHECK_EQ(chrome::NOTIFICATION_EXTENSION_UPDATING_STARTED, type); 133 DCHECK_EQ(extensions::NOTIFICATION_EXTENSION_UPDATING_STARTED, type);
134 CheckExitCondition(); 134 CheckExitCondition();
135 } 135 }
136 136
137 void ThemePendingInstallChecker::Wait() { 137 void ThemePendingInstallChecker::Wait() {
138 // We'll check to see if the condition is met whenever the extension system 138 // We'll check to see if the condition is met whenever the extension system
139 // tries to contact the web store. 139 // tries to contact the web store.
140 registrar_.Add(this, 140 registrar_.Add(this,
141 chrome::NOTIFICATION_EXTENSION_UPDATING_STARTED, 141 extensions::NOTIFICATION_EXTENSION_UPDATING_STARTED,
142 content::Source<Profile>(profile_)); 142 content::Source<Profile>(profile_));
143 143
144 if (IsExitConditionSatisfied()) { 144 if (IsExitConditionSatisfied()) {
145 return; 145 return;
146 } 146 }
147 147
148 StartBlockingWait(); 148 StartBlockingWait();
149 } 149 }
150 150
151 } // namespace 151 } // namespace
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 bool AwaitUsingDefaultTheme(Profile* profile) { 254 bool AwaitUsingDefaultTheme(Profile* profile) {
255 ThemeConditionChecker checker( 255 ThemeConditionChecker checker(
256 profile, 256 profile,
257 std::string("Waiting until profile is using default theme"), 257 std::string("Waiting until profile is using default theme"),
258 base::Bind(&UsingDefaultThemeFunc)); 258 base::Bind(&UsingDefaultThemeFunc));
259 checker.Wait(); 259 checker.Wait();
260 return !checker.TimedOut(); 260 return !checker.TimedOut();
261 } 261 }
262 262
263 } // namespace themes_helper 263 } // namespace themes_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698