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

Side by Side Diff: content/browser/loader/navigation_url_loader_unittest.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 browser_context_->GetResourceContext()->GetRequestContext(); 156 browser_context_->GetResourceContext()->GetRequestContext();
157 // Attach URLRequestTestJob and make streams work. 157 // Attach URLRequestTestJob and make streams work.
158 job_factory_.SetProtocolHandler( 158 job_factory_.SetProtocolHandler(
159 "test", net::URLRequestTestJob::CreateProtocolHandler()); 159 "test", net::URLRequestTestJob::CreateProtocolHandler());
160 job_factory_.SetProtocolHandler( 160 job_factory_.SetProtocolHandler(
161 "blob", new StreamProtocolHandler( 161 "blob", new StreamProtocolHandler(
162 StreamContext::GetFor(browser_context_.get())->registry())); 162 StreamContext::GetFor(browser_context_.get())->registry()));
163 request_context->set_job_factory(&job_factory_); 163 request_context->set_job_factory(&job_factory_);
164 164
165 // NavigationURLLoader is only used for browser-side navigations. 165 // NavigationURLLoader is only used for browser-side navigations.
166 CommandLine::ForCurrentProcess()->AppendSwitch( 166 base::CommandLine::ForCurrentProcess()->AppendSwitch(
167 switches::kEnableBrowserSideNavigation); 167 switches::kEnableBrowserSideNavigation);
168 } 168 }
169 169
170 scoped_ptr<NavigationURLLoader> MakeTestLoader( 170 scoped_ptr<NavigationURLLoader> MakeTestLoader(
171 const GURL& url, 171 const GURL& url,
172 NavigationURLLoaderDelegate* delegate) { 172 NavigationURLLoaderDelegate* delegate) {
173 FrameHostMsg_BeginNavigation_Params begin_params; 173 FrameHostMsg_BeginNavigation_Params begin_params;
174 CommonNavigationParams common_params; 174 CommonNavigationParams common_params;
175 begin_params.method = "GET"; 175 begin_params.method = "GET";
176 common_params.url = url; 176 common_params.url = url;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 // Release the body. 381 // Release the body.
382 delegate.ReleaseBody(); 382 delegate.ReleaseBody();
383 base::RunLoop().RunUntilIdle(); 383 base::RunLoop().RunUntilIdle();
384 384
385 // Verify that URLRequestTestJob no longer has anything paused. 385 // Verify that URLRequestTestJob no longer has anything paused.
386 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); 386 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage());
387 } 387 }
388 388
389 } // namespace content 389 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/cross_site_resource_handler.cc ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698