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

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

Issue 16703018: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/extensions/external_provider_impl.h" 5 #include "chrome/browser/extensions/external_provider_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Constants for keeping track of extension preferences in a dictionary. 57 // Constants for keeping track of extension preferences in a dictionary.
58 const char ExternalProviderImpl::kExternalCrx[] = "external_crx"; 58 const char ExternalProviderImpl::kExternalCrx[] = "external_crx";
59 const char ExternalProviderImpl::kExternalVersion[] = "external_version"; 59 const char ExternalProviderImpl::kExternalVersion[] = "external_version";
60 const char ExternalProviderImpl::kExternalUpdateUrl[] = "external_update_url"; 60 const char ExternalProviderImpl::kExternalUpdateUrl[] = "external_update_url";
61 const char ExternalProviderImpl::kSupportedLocales[] = "supported_locales"; 61 const char ExternalProviderImpl::kSupportedLocales[] = "supported_locales";
62 const char ExternalProviderImpl::kIsBookmarkApp[] = "is_bookmark_app"; 62 const char ExternalProviderImpl::kIsBookmarkApp[] = "is_bookmark_app";
63 const char ExternalProviderImpl::kIsFromWebstore[] = "is_from_webstore"; 63 const char ExternalProviderImpl::kIsFromWebstore[] = "is_from_webstore";
64 const char ExternalProviderImpl::kKeepIfPresent[] = "keep_if_present"; 64 const char ExternalProviderImpl::kKeepIfPresent[] = "keep_if_present";
65 65
66 ExternalProviderImpl::ExternalProviderImpl( 66 ExternalProviderImpl::ExternalProviderImpl(VisitorInterface* service,
67 VisitorInterface* service, 67 ExternalLoader* loader,
68 ExternalLoader* loader, 68 Profile* profile,
69 Profile* profile, 69 Manifest::Location crx_location,
70 Manifest::Location crx_location, 70 Manifest::Location download_location,
71 Manifest::Location download_location, 71 int creation_flags)
72 int creation_flags) 72 : crx_location_(crx_location),
73 : crx_location_(crx_location), 73 download_location_(download_location),
74 download_location_(download_location), 74 service_(service),
75 service_(service), 75 ready_(false),
76 prefs_(NULL), 76 loader_(loader),
77 ready_(false), 77 profile_(profile),
78 loader_(loader), 78 creation_flags_(creation_flags),
79 profile_(profile), 79 auto_acknowledge_(false) {
80 creation_flags_(creation_flags),
81 auto_acknowledge_(false) {
82 loader_->Init(this); 80 loader_->Init(this);
83 } 81 }
84 82
85 ExternalProviderImpl::~ExternalProviderImpl() { 83 ExternalProviderImpl::~ExternalProviderImpl() {
86 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 84 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
87 loader_->OwnerShutdown(); 85 loader_->OwnerShutdown();
88 } 86 }
89 87
90 void ExternalProviderImpl::VisitRegisteredExtension() { 88 void ExternalProviderImpl::VisitRegisteredExtension() {
91 // The loader will call back to SetPrefs. 89 // The loader will call back to SetPrefs.
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 new ExternalProviderImpl( 488 new ExternalProviderImpl(
491 service, 489 service,
492 new ExternalComponentLoader(), 490 new ExternalComponentLoader(),
493 profile, 491 profile,
494 Manifest::INVALID_LOCATION, 492 Manifest::INVALID_LOCATION,
495 Manifest::EXTERNAL_POLICY_DOWNLOAD, 493 Manifest::EXTERNAL_POLICY_DOWNLOAD,
496 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); 494 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT)));
497 } 495 }
498 496
499 } // namespace extensions 497 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698