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

Side by Side Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() Created 4 years, 3 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
« no previous file with comments | « content/browser/streams/stream_url_request_job_unittest.cc ('k') | no next file » | 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) 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 "content/browser/webui/url_data_manager_backend.h" 5 #include "content/browser/webui/url_data_manager_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 data_sources_.clear(); 607 data_sources_.clear();
608 } 608 }
609 609
610 // static 610 // static
611 std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler> 611 std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>
612 URLDataManagerBackend::CreateProtocolHandler( 612 URLDataManagerBackend::CreateProtocolHandler(
613 ResourceContext* resource_context, 613 ResourceContext* resource_context,
614 bool is_incognito, 614 bool is_incognito,
615 ChromeBlobStorageContext* blob_storage_context) { 615 ChromeBlobStorageContext* blob_storage_context) {
616 DCHECK(resource_context); 616 DCHECK(resource_context);
617 return base::WrapUnique(new ChromeProtocolHandler( 617 return base::MakeUnique<ChromeProtocolHandler>(resource_context, is_incognito,
618 resource_context, is_incognito, blob_storage_context)); 618 blob_storage_context);
619 } 619 }
620 620
621 void URLDataManagerBackend::AddDataSource( 621 void URLDataManagerBackend::AddDataSource(
622 URLDataSourceImpl* source) { 622 URLDataSourceImpl* source) {
623 DCHECK_CURRENTLY_ON(BrowserThread::IO); 623 DCHECK_CURRENTLY_ON(BrowserThread::IO);
624 DataSourceMap::iterator i = data_sources_.find(source->source_name()); 624 DataSourceMap::iterator i = data_sources_.find(source->source_name());
625 if (i != data_sources_.end()) { 625 if (i != data_sources_.end()) {
626 if (!source->source()->ShouldReplaceExistingSource()) 626 if (!source->source()->ShouldReplaceExistingSource())
627 return; 627 return;
628 i->second->backend_ = nullptr; 628 i->second->backend_ = nullptr;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 835
836 } // namespace 836 } // namespace
837 837
838 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler( 838 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler(
839 ResourceContext* resource_context, 839 ResourceContext* resource_context,
840 bool is_incognito) { 840 bool is_incognito) {
841 return new DevToolsJobFactory(resource_context, is_incognito); 841 return new DevToolsJobFactory(resource_context, is_incognito);
842 } 842 }
843 843
844 } // namespace content 844 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/streams/stream_url_request_job_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698