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

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 5784004: Add DCHECKs to StatefulExternalExtensionProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase before commit Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/external_policy_extension_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 new ExternalPrefExtensionProvider())); 295 new ExternalPrefExtensionProvider()));
296 #if defined(OS_WIN) 296 #if defined(OS_WIN)
297 external_extension_providers_.push_back( 297 external_extension_providers_.push_back(
298 linked_ptr<ExternalExtensionProvider>( 298 linked_ptr<ExternalExtensionProvider>(
299 new ExternalRegistryExtensionProvider())); 299 new ExternalRegistryExtensionProvider()));
300 #endif 300 #endif
301 // The policy-controlled extension provider is also stored in a member 301 // The policy-controlled extension provider is also stored in a member
302 // variable so that UpdateExternalPolicyExtensionProvider can access it and 302 // variable so that UpdateExternalPolicyExtensionProvider can access it and
303 // update its extension list later. 303 // update its extension list later.
304 external_policy_extension_provider_.reset( 304 external_policy_extension_provider_.reset(
305 new ExternalPolicyExtensionProvider()); 305 new ExternalPolicyExtensionProvider(
306 external_policy_extension_provider_->SetPreferences( 306 prefs->GetList(prefs::kExtensionInstallForceList)));
307 prefs->GetList(prefs::kExtensionInstallForceList));
308 external_extension_providers_.push_back(external_policy_extension_provider_); 307 external_extension_providers_.push_back(external_policy_extension_provider_);
309 } 308 }
310 309
311 ExtensionServiceBackend::~ExtensionServiceBackend() { 310 ExtensionServiceBackend::~ExtensionServiceBackend() {
312 } 311 }
313 312
314 void ExtensionServiceBackend::LoadSingleExtension( 313 void ExtensionServiceBackend::LoadSingleExtension(
315 const FilePath& path_in, scoped_refptr<ExtensionService> frontend) { 314 const FilePath& path_in, scoped_refptr<ExtensionService> frontend) {
316 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 315 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
317 316
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 } 2105 }
2107 2106
2108 void ExtensionService::SetBeingUpgraded(const Extension* extension, 2107 void ExtensionService::SetBeingUpgraded(const Extension* extension,
2109 bool value) { 2108 bool value) {
2110 extension_runtime_data_[extension->id()].being_upgraded = value; 2109 extension_runtime_data_[extension->id()].being_upgraded = value;
2111 } 2110 }
2112 2111
2113 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { 2112 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) {
2114 return &extension_runtime_data_[extension->id()].property_bag; 2113 return &extension_runtime_data_[extension->id()].property_bag;
2115 } 2114 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/external_policy_extension_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698