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

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

Issue 386033002: Prune shared extendion module after extension updating. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review issues Created 6 years, 5 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/sync/test/integration/extensions_helper.h" 5 #include "chrome/browser/sync/test/integration/extensions_helper.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // extensions::ExtensionRegistryObserver implementation. 150 // extensions::ExtensionRegistryObserver implementation.
151 virtual void OnExtensionLoaded( 151 virtual void OnExtensionLoaded(
152 content::BrowserContext* context, 152 content::BrowserContext* context,
153 const extensions::Extension* extension) OVERRIDE; 153 const extensions::Extension* extension) OVERRIDE;
154 virtual void OnExtensionUnloaded( 154 virtual void OnExtensionUnloaded(
155 content::BrowserContext* context, 155 content::BrowserContext* context,
156 const extensions::Extension* extenion, 156 const extensions::Extension* extenion,
157 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; 157 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
158 virtual void OnExtensionInstalled( 158 virtual void OnExtensionInstalled(
159 content::BrowserContext* browser_context, 159 content::BrowserContext* browser_context,
160 const extensions::Extension* extension) OVERRIDE; 160 const extensions::Extension* extension,
161 bool is_update) OVERRIDE;
161 virtual void OnExtensionUninstalled( 162 virtual void OnExtensionUninstalled(
162 content::BrowserContext* browser_context, 163 content::BrowserContext* browser_context,
163 const extensions::Extension* extension) OVERRIDE; 164 const extensions::Extension* extension) OVERRIDE;
164 165
165 void Wait(); 166 void Wait();
166 167
167 private: 168 private:
168 std::vector<Profile*> profiles_; 169 std::vector<Profile*> profiles_;
169 ScopedVector<SyncedExtensionInstaller> synced_extension_installers_; 170 ScopedVector<SyncedExtensionInstaller> synced_extension_installers_;
170 bool observing_; 171 bool observing_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 216
216 void ExtensionsMatchChecker::OnExtensionUnloaded( 217 void ExtensionsMatchChecker::OnExtensionUnloaded(
217 content::BrowserContext* context, 218 content::BrowserContext* context,
218 const extensions::Extension* extenion, 219 const extensions::Extension* extenion,
219 extensions::UnloadedExtensionInfo::Reason reason) { 220 extensions::UnloadedExtensionInfo::Reason reason) {
220 CheckExitCondition(); 221 CheckExitCondition();
221 } 222 }
222 223
223 void ExtensionsMatchChecker::OnExtensionInstalled( 224 void ExtensionsMatchChecker::OnExtensionInstalled(
224 content::BrowserContext* browser_context, 225 content::BrowserContext* browser_context,
225 const extensions::Extension* extension) { 226 const extensions::Extension* extension,
227 bool is_update) {
226 CheckExitCondition(); 228 CheckExitCondition();
227 } 229 }
228 230
229 void ExtensionsMatchChecker::OnExtensionUninstalled( 231 void ExtensionsMatchChecker::OnExtensionUninstalled(
230 content::BrowserContext* browser_context, 232 content::BrowserContext* browser_context,
231 const extensions::Extension* extension) { 233 const extensions::Extension* extension) {
232 CheckExitCondition(); 234 CheckExitCondition();
233 } 235 }
234 236
235 void ExtensionsMatchChecker::Wait() { 237 void ExtensionsMatchChecker::Wait() {
(...skipping 27 matching lines...) Expand all
263 for (int i = 0; i < test()->num_clients(); ++i) { 265 for (int i = 0; i < test()->num_clients(); ++i) {
264 profiles.push_back(test()->GetProfile(i)); 266 profiles.push_back(test()->GetProfile(i));
265 } 267 }
266 268
267 ExtensionsMatchChecker checker(profiles); 269 ExtensionsMatchChecker checker(profiles);
268 checker.Wait(); 270 checker.Wait();
269 return !checker.TimedOut(); 271 return !checker.TimedOut();
270 } 272 }
271 273
272 } // namespace extensions_helper 274 } // namespace extensions_helper
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/sync_file_system/sync_file_system_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698