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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 11369179: Move url_request_test_util into net namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 1 month 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 "chrome/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess( 611 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess(
612 int renderer_child_id) { 612 int renderer_child_id) {
613 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( 613 content::RenderProcessHost* rph = content::RenderProcessHost::FromID(
614 renderer_child_id); 614 renderer_child_id);
615 return rph->GetStoragePartition()->GetURLRequestContext(); 615 return rph->GetStoragePartition()->GetURLRequestContext();
616 } 616 }
617 617
618 void TestingProfile::CreateRequestContext() { 618 void TestingProfile::CreateRequestContext() {
619 if (!request_context_) 619 if (!request_context_)
620 request_context_ = 620 request_context_ =
621 new TestURLRequestContextGetter( 621 new net::TestURLRequestContextGetter(
622 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 622 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
623 } 623 }
624 624
625 void TestingProfile::ResetRequestContext() { 625 void TestingProfile::ResetRequestContext() {
626 // Any objects holding live URLFetchers should be deleted before the request 626 // Any objects holding live URLFetchers should be deleted before the request
627 // context is shut down. 627 // context is shut down.
628 TemplateURLFetcherFactory::ShutdownForProfile(this); 628 TemplateURLFetcherFactory::ShutdownForProfile(this);
629 629
630 request_context_ = NULL; 630 request_context_ = NULL;
631 } 631 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { 823 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
824 DCHECK(!build_called_); 824 DCHECK(!build_called_);
825 build_called_ = true; 825 build_called_ = true;
826 return scoped_ptr<TestingProfile>(new TestingProfile( 826 return scoped_ptr<TestingProfile>(new TestingProfile(
827 path_, 827 path_,
828 delegate_, 828 delegate_,
829 extension_policy_, 829 extension_policy_,
830 pref_service_.Pass(), 830 pref_service_.Pass(),
831 user_cloud_policy_manager_.Pass())); 831 user_cloud_policy_manager_.Pass()));
832 } 832 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc ('k') | chrome_frame/test/net/fake_external_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698