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

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

Issue 10831008: Refactor and fix declarative webRequest API permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed license headers Created 8 years, 4 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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_app_helper.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698