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

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

Issue 2783113002: nit: Pass ownership of CVDelegate to ContentVerifier using unique_ptr. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "apps/app_restore_service.h" 9 #include "apps/app_restore_service.h"
10 #include "apps/app_restore_service_factory.h" 10 #include "apps/app_restore_service_factory.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 TRACE_EVENT0("browser,startup", "ExtensionSystemImpl::Shared::Init"); 190 TRACE_EVENT0("browser,startup", "ExtensionSystemImpl::Shared::Init");
191 const base::CommandLine* command_line = 191 const base::CommandLine* command_line =
192 base::CommandLine::ForCurrentProcess(); 192 base::CommandLine::ForCurrentProcess();
193 193
194 navigation_observer_.reset(new NavigationObserver(profile_)); 194 navigation_observer_.reset(new NavigationObserver(profile_));
195 195
196 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); 196 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs);
197 ExtensionErrorReporter::Init(allow_noisy_errors); 197 ExtensionErrorReporter::Init(allow_noisy_errors);
198 198
199 content_verifier_ = new ContentVerifier( 199 content_verifier_ = new ContentVerifier(
200 profile_, new ChromeContentVerifierDelegate(profile_)); 200 profile_, base::MakeUnique<ChromeContentVerifierDelegate>(profile_));
201 201
202 service_worker_manager_.reset(new ServiceWorkerManager(profile_)); 202 service_worker_manager_.reset(new ServiceWorkerManager(profile_));
203 203
204 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); 204 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_));
205 205
206 // ExtensionService depends on RuntimeData. 206 // ExtensionService depends on RuntimeData.
207 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); 207 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_)));
208 208
209 bool autoupdate_enabled = !profile_->IsGuestSession() && 209 bool autoupdate_enabled = !profile_->IsGuestSession() &&
210 !profile_->IsSystemProfile(); 210 !profile_->IsSystemProfile();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 463 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
464 const std::string& extension_id, 464 const std::string& extension_id,
465 const UnloadedExtensionInfo::Reason reason) { 465 const UnloadedExtensionInfo::Reason reason) {
466 BrowserThread::PostTask( 466 BrowserThread::PostTask(
467 BrowserThread::IO, 467 BrowserThread::IO,
468 FROM_HERE, 468 FROM_HERE,
469 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 469 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
470 } 470 }
471 471
472 } // namespace extensions 472 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_protocols_unittest.cc ('k') | extensions/browser/content_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698