OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |