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