| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/net/ios_chrome_url_request_context_getter.h" | 5 #include "ios/chrome/browser/net/ios_chrome_url_request_context_getter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 scoped_refptr<base::SingleThreadTaskRunner> | 120 scoped_refptr<base::SingleThreadTaskRunner> |
| 121 IOSChromeURLRequestContextGetter::GetNetworkTaskRunner() const { | 121 IOSChromeURLRequestContextGetter::GetNetworkTaskRunner() const { |
| 122 return web::WebThread::GetTaskRunnerForThread(web::WebThread::IO); | 122 return web::WebThread::GetTaskRunnerForThread(web::WebThread::IO); |
| 123 } | 123 } |
| 124 | 124 |
| 125 // static | 125 // static |
| 126 IOSChromeURLRequestContextGetter* IOSChromeURLRequestContextGetter::Create( | 126 IOSChromeURLRequestContextGetter* IOSChromeURLRequestContextGetter::Create( |
| 127 const ChromeBrowserStateIOData* io_data, | 127 const ChromeBrowserStateIOData* io_data, |
| 128 ProtocolHandlerMap* protocol_handlers) { | 128 ProtocolHandlerMap* protocol_handlers) { |
| 129 return new IOSChromeURLRequestContextGetter( | 129 return new IOSChromeURLRequestContextGetter( |
| 130 base::WrapUnique(new FactoryForMain(io_data, protocol_handlers))); | 130 base::MakeUnique<FactoryForMain>(io_data, protocol_handlers)); |
| 131 } | 131 } |
| 132 | 132 |
| 133 // static | 133 // static |
| 134 IOSChromeURLRequestContextGetter* | 134 IOSChromeURLRequestContextGetter* |
| 135 IOSChromeURLRequestContextGetter::CreateForIsolatedApp( | 135 IOSChromeURLRequestContextGetter::CreateForIsolatedApp( |
| 136 net::URLRequestContextGetter* main_context, | 136 net::URLRequestContextGetter* main_context, |
| 137 const ChromeBrowserStateIOData* io_data, | 137 const ChromeBrowserStateIOData* io_data, |
| 138 const base::FilePath& partition_path) { | 138 const base::FilePath& partition_path) { |
| 139 return new IOSChromeURLRequestContextGetter(base::WrapUnique( | 139 return new IOSChromeURLRequestContextGetter( |
| 140 new FactoryForIsolatedApp(io_data, partition_path, main_context))); | 140 base::MakeUnique<FactoryForIsolatedApp>(io_data, partition_path, |
| 141 main_context)); |
| 141 } | 142 } |
| OLD | NEW |