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/sync_extension_helper.h" | 5 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 << " do not match profile " << profile2->GetDebugName(); | 236 << " do not match profile " << profile2->GetDebugName(); |
237 return false; | 237 return false; |
238 } | 238 } |
239 ++it1; | 239 ++it1; |
240 ++it2; | 240 ++it2; |
241 } | 241 } |
242 return true; | 242 return true; |
243 } | 243 } |
244 | 244 |
245 void SyncExtensionHelper::SetupProfile(Profile* profile) { | 245 void SyncExtensionHelper::SetupProfile(Profile* profile) { |
246 extensions::ExtensionSystem::Get(profile)->Init(true); | 246 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(true); |
247 profile_extensions_.insert(make_pair(profile, ExtensionNameMap())); | 247 profile_extensions_.insert(make_pair(profile, ExtensionNameMap())); |
248 } | 248 } |
249 | 249 |
250 namespace { | 250 namespace { |
251 | 251 |
252 std::string NameToPublicKey(const std::string& name) { | 252 std::string NameToPublicKey(const std::string& name) { |
253 std::string public_key; | 253 std::string public_key; |
254 std::string pem; | 254 std::string pem; |
255 EXPECT_TRUE(Extension::ProducePEM(name, &pem) && | 255 EXPECT_TRUE(Extension::ProducePEM(name, &pem) && |
256 Extension::FormatPEMForFileOutput(pem, &public_key, | 256 Extension::FormatPEMForFileOutput(pem, &public_key, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 if (extension->id() != expected_id) { | 347 if (extension->id() != expected_id) { |
348 EXPECT_EQ(expected_id, extension->id()); | 348 EXPECT_EQ(expected_id, extension->id()); |
349 return NULL; | 349 return NULL; |
350 } | 350 } |
351 DVLOG(2) << "created extension with name = " | 351 DVLOG(2) << "created extension with name = " |
352 << name << ", id = " << expected_id; | 352 << name << ", id = " << expected_id; |
353 (it->second)[name] = extension; | 353 (it->second)[name] = extension; |
354 id_to_name_[expected_id] = name; | 354 id_to_name_[expected_id] = name; |
355 return extension; | 355 return extension; |
356 } | 356 } |
OLD | NEW |