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

Side by Side Diff: content/shell/browser/shell_browser_context.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/shell_browser_context.h" 5 #include "content/shell/browser/shell_browser_context.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/command_line.h" 10 #include "base/command_line.h"
9 #include "base/environment.h" 11 #include "base/environment.h"
10 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #include "base/path_service.h" 14 #include "base/path_service.h"
13 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
14 #include "build/build_config.h" 16 #include "build/build_config.h"
15 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/storage_partition.h" 18 #include "content/public/browser/storage_partition.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 124
123 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { 125 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() {
124 return GetDefaultStoragePartition(this)->GetURLRequestContext(); 126 return GetDefaultStoragePartition(this)->GetURLRequestContext();
125 } 127 }
126 128
127 ShellURLRequestContextGetter* 129 ShellURLRequestContextGetter*
128 ShellBrowserContext::CreateURLRequestContextGetter( 130 ShellBrowserContext::CreateURLRequestContextGetter(
129 ProtocolHandlerMap* protocol_handlers, 131 ProtocolHandlerMap* protocol_handlers,
130 URLRequestInterceptorScopedVector request_interceptors) { 132 URLRequestInterceptorScopedVector request_interceptors) {
131 return new ShellURLRequestContextGetter( 133 return new ShellURLRequestContextGetter(
132 ignore_certificate_errors_, 134 ignore_certificate_errors_, GetPath(),
133 GetPath(),
134 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), 135 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
135 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), 136 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
136 protocol_handlers, 137 protocol_handlers, std::move(request_interceptors), net_log_);
137 request_interceptors.Pass(),
138 net_log_);
139 } 138 }
140 139
141 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( 140 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext(
142 ProtocolHandlerMap* protocol_handlers, 141 ProtocolHandlerMap* protocol_handlers,
143 URLRequestInterceptorScopedVector request_interceptors) { 142 URLRequestInterceptorScopedVector request_interceptors) {
144 DCHECK(!url_request_getter_.get()); 143 DCHECK(!url_request_getter_.get());
145 url_request_getter_ = CreateURLRequestContextGetter( 144 url_request_getter_ = CreateURLRequestContextGetter(
146 protocol_handlers, request_interceptors.Pass()); 145 protocol_handlers, std::move(request_interceptors));
147 resource_context_->set_url_request_context_getter(url_request_getter_.get()); 146 resource_context_->set_url_request_context_getter(url_request_getter_.get());
148 return url_request_getter_.get(); 147 return url_request_getter_.get();
149 } 148 }
150 149
151 net::URLRequestContextGetter* 150 net::URLRequestContextGetter*
152 ShellBrowserContext::GetRequestContextForRenderProcess( 151 ShellBrowserContext::GetRequestContextForRenderProcess(
153 int renderer_child_id) { 152 int renderer_child_id) {
154 return GetRequestContext(); 153 return GetRequestContext();
155 } 154 }
156 155
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 if (!permission_manager_.get()) 204 if (!permission_manager_.get())
206 permission_manager_.reset(new ShellPermissionManager()); 205 permission_manager_.reset(new ShellPermissionManager());
207 return permission_manager_.get(); 206 return permission_manager_.get();
208 } 207 }
209 208
210 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() { 209 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() {
211 return nullptr; 210 return nullptr;
212 } 211 }
213 212
214 } // namespace content 213 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698