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

Side by Side Diff: ui/views/examples/content_client/examples_content_browser_client.cc

Issue 187223003: Allow content layer to pass ProtocolInterceptors when we create URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 "ui/views/examples/content_client/examples_content_browser_client.h" 5 #include "ui/views/examples/content_client/examples_content_browser_client.h"
6 6
7 #include "content/shell/browser/shell_browser_context.h" 7 #include "content/shell/browser/shell_browser_context.h"
8 #include "ui/views/examples/content_client/examples_browser_main_parts.h" 8 #include "ui/views/examples/content_client/examples_browser_main_parts.h"
9 9
10 namespace views { 10 namespace views {
11 namespace examples { 11 namespace examples {
12 12
13 ExamplesContentBrowserClient::ExamplesContentBrowserClient() 13 ExamplesContentBrowserClient::ExamplesContentBrowserClient()
14 : examples_browser_main_parts_(NULL) { 14 : examples_browser_main_parts_(NULL) {
15 } 15 }
16 16
17 ExamplesContentBrowserClient::~ExamplesContentBrowserClient() { 17 ExamplesContentBrowserClient::~ExamplesContentBrowserClient() {
18 } 18 }
19 19
20 content::BrowserMainParts* ExamplesContentBrowserClient::CreateBrowserMainParts( 20 content::BrowserMainParts* ExamplesContentBrowserClient::CreateBrowserMainParts(
21 const content::MainFunctionParams& parameters) { 21 const content::MainFunctionParams& parameters) {
22 examples_browser_main_parts_ = new ExamplesBrowserMainParts(parameters); 22 examples_browser_main_parts_ = new ExamplesBrowserMainParts(parameters);
23 return examples_browser_main_parts_; 23 return examples_browser_main_parts_;
24 } 24 }
25 25
26 net::URLRequestContextGetter* 26 net::URLRequestContextGetter*
27 ExamplesContentBrowserClient::CreateRequestContext( 27 ExamplesContentBrowserClient::CreateRequestContext(
28 content::BrowserContext* content_browser_context, 28 content::BrowserContext* content_browser_context,
29 content::ProtocolHandlerMap* protocol_handlers) { 29 content::ProtocolHandlerMap* protocol_handlers,
30 content::ProtocolHandlerScopedVector protocol_interceptors) {
30 content::ShellBrowserContext* shell_context = 31 content::ShellBrowserContext* shell_context =
31 examples_browser_main_parts_->browser_context(); 32 examples_browser_main_parts_->browser_context();
32 return shell_context->CreateRequestContext(protocol_handlers); 33 return shell_context->CreateRequestContext(protocol_handlers,
34 protocol_interceptors.Pass());
33 } 35 }
34 36
35 } // namespace examples 37 } // namespace examples
36 } // namespace views 38 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698