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_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 << " do not match profile " << profile2->GetDebugName(); | 245 << " do not match profile " << profile2->GetDebugName(); |
246 return false; | 246 return false; |
247 } | 247 } |
248 ++it1; | 248 ++it1; |
249 ++it2; | 249 ++it2; |
250 } | 250 } |
251 return true; | 251 return true; |
252 } | 252 } |
253 | 253 |
254 void SyncExtensionHelper::SetupProfile(Profile* profile) { | 254 void SyncExtensionHelper::SetupProfile(Profile* profile) { |
255 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(true); | 255 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(true, false); |
256 profile_extensions_.insert(make_pair(profile, ExtensionNameMap())); | 256 profile_extensions_.insert(make_pair(profile, ExtensionNameMap())); |
257 } | 257 } |
258 | 258 |
259 namespace { | 259 namespace { |
260 | 260 |
261 std::string NameToPublicKey(const std::string& name) { | 261 std::string NameToPublicKey(const std::string& name) { |
262 std::string public_key; | 262 std::string public_key; |
263 std::string pem; | 263 std::string pem; |
264 EXPECT_TRUE(Extension::ProducePEM(name, &pem) && | 264 EXPECT_TRUE(Extension::ProducePEM(name, &pem) && |
265 Extension::FormatPEMForFileOutput(pem, &public_key, | 265 Extension::FormatPEMForFileOutput(pem, &public_key, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 EXPECT_EQ(expected_id, extension->id()); | 369 EXPECT_EQ(expected_id, extension->id()); |
370 return NULL; | 370 return NULL; |
371 } | 371 } |
372 DVLOG(2) << "created extension with name = " | 372 DVLOG(2) << "created extension with name = " |
373 << name << ", id = " << expected_id; | 373 << name << ", id = " << expected_id; |
374 (it->second)[name] = extension; | 374 (it->second)[name] = extension; |
375 id_to_name_[expected_id] = name; | 375 id_to_name_[expected_id] = name; |
376 id_to_type_[expected_id] = type; | 376 id_to_type_[expected_id] = type; |
377 return extension; | 377 return extension; |
378 } | 378 } |
OLD | NEW |