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

Side by Side Diff: content/shell/shell_url_request_context_getter.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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
« no previous file with comments | « content/shell/shell_javascript_dialog_manager.cc ('k') | content/shell/webkit_test_runner.cc » ('j') | 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/shell/shell_url_request_context_getter.h" 5 #include "content/shell/shell_url_request_context_getter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 io_loop_->message_loop_proxy(), file_loop_)); 77 io_loop_->message_loop_proxy(), file_loop_));
78 } 78 }
79 } 79 }
80 80
81 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { 81 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() {
82 } 82 }
83 83
84 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { 84 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
86 86
87 if (!url_request_context_.get()) { 87 if (!url_request_context_) {
88 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 88 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
89 89
90 url_request_context_.reset(new net::URLRequestContext()); 90 url_request_context_.reset(new net::URLRequestContext());
91 network_delegate_.reset(new ShellNetworkDelegate); 91 network_delegate_.reset(new ShellNetworkDelegate);
92 if (command_line.HasSwitch(switches::kDumpRenderTree)) 92 if (command_line.HasSwitch(switches::kDumpRenderTree))
93 ShellNetworkDelegate::SetAcceptAllCookies(false); 93 ShellNetworkDelegate::SetAcceptAllCookies(false);
94 url_request_context_->set_network_delegate(network_delegate_.get()); 94 url_request_context_->set_network_delegate(network_delegate_.get());
95 storage_.reset( 95 storage_.reset(
96 new net::URLRequestContextStorage(url_request_context_.get())); 96 new net::URLRequestContextStorage(url_request_context_.get()));
97 storage_->set_cookie_store(new net::CookieMonster(NULL, NULL)); 97 storage_->set_cookie_store(new net::CookieMonster(NULL, NULL));
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 scoped_refptr<base::SingleThreadTaskRunner> 192 scoped_refptr<base::SingleThreadTaskRunner>
193 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 193 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
194 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 194 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
195 } 195 }
196 196
197 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 197 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
198 return url_request_context_->host_resolver(); 198 return url_request_context_->host_resolver();
199 } 199 }
200 200
201 } // namespace content 201 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_javascript_dialog_manager.cc ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698