| 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/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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 241     synced_extension_installers_.push_back(new SyncedExtensionInstaller(*it)); | 241     synced_extension_installers_.push_back(new SyncedExtensionInstaller(*it)); | 
| 242 | 242 | 
| 243     extensions::ExtensionRegistry* registry = | 243     extensions::ExtensionRegistry* registry = | 
| 244         extensions::ExtensionRegistry::Get(*it); | 244         extensions::ExtensionRegistry::Get(*it); | 
| 245     registry->AddObserver(this); | 245     registry->AddObserver(this); | 
| 246   } | 246   } | 
| 247 | 247 | 
| 248   observing_ = true; | 248   observing_ = true; | 
| 249 | 249 | 
| 250   if (IsExitConditionSatisfied()) { | 250   if (IsExitConditionSatisfied()) { | 
| 251     VLOG(1) << "Extensions matched without waiting"; | 251     DVLOG(1) << "Extensions matched without waiting"; | 
| 252     return; | 252     return; | 
| 253   } | 253   } | 
| 254 | 254 | 
| 255   VLOG(1) << "Starting Wait: " << GetDebugMessage(); | 255   DVLOG(1) << "Starting Wait: " << GetDebugMessage(); | 
| 256   StartBlockingWait(); | 256   StartBlockingWait(); | 
| 257 } | 257 } | 
| 258 | 258 | 
| 259 }  // namespace | 259 }  // namespace | 
| 260 | 260 | 
| 261 bool AwaitAllProfilesHaveSameExtensionsAsVerifier() { | 261 bool AwaitAllProfilesHaveSameExtensionsAsVerifier() { | 
| 262   std::vector<Profile*> profiles; | 262   std::vector<Profile*> profiles; | 
| 263   profiles.push_back(test()->verifier()); | 263   profiles.push_back(test()->verifier()); | 
| 264   for (int i = 0; i < test()->num_clients(); ++i) { | 264   for (int i = 0; i < test()->num_clients(); ++i) { | 
| 265     profiles.push_back(test()->GetProfile(i)); | 265     profiles.push_back(test()->GetProfile(i)); | 
| 266   } | 266   } | 
| 267 | 267 | 
| 268   ExtensionsMatchChecker checker(profiles); | 268   ExtensionsMatchChecker checker(profiles); | 
| 269   checker.Wait(); | 269   checker.Wait(); | 
| 270   return !checker.TimedOut(); | 270   return !checker.TimedOut(); | 
| 271 } | 271 } | 
| 272 | 272 | 
| 273 }  // namespace extensions_helper | 273 }  // namespace extensions_helper | 
| OLD | NEW | 
|---|