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

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

Issue 9562037: Move TestURLRequestContextGetter to url_request_test_util.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change comment Created 8 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 "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 26 matching lines...) Expand all
37 #include "chrome/browser/search_engines/template_url_service_factory.h" 37 #include "chrome/browser/search_engines/template_url_service_factory.h"
38 #include "chrome/browser/signin/token_service.h" 38 #include "chrome/browser/signin/token_service.h"
39 #include "chrome/browser/speech/chrome_speech_input_preferences.h" 39 #include "chrome/browser/speech/chrome_speech_input_preferences.h"
40 #include "chrome/browser/sync/profile_sync_service_mock.h" 40 #include "chrome/browser/sync/profile_sync_service_mock.h"
41 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 41 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
42 #include "chrome/common/chrome_constants.h" 42 #include "chrome/common/chrome_constants.h"
43 #include "chrome/common/chrome_notification_types.h" 43 #include "chrome/common/chrome_notification_types.h"
44 #include "chrome/common/chrome_switches.h" 44 #include "chrome/common/chrome_switches.h"
45 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
46 #include "chrome/test/base/bookmark_load_observer.h" 46 #include "chrome/test/base/bookmark_load_observer.h"
47 #include "chrome/test/base/test_url_request_context_getter.h"
48 #include "chrome/test/base/testing_pref_service.h" 47 #include "chrome/test/base/testing_pref_service.h"
49 #include "chrome/test/base/ui_test_utils.h" 48 #include "chrome/test/base/ui_test_utils.h"
50 #include "content/browser/mock_resource_context.h" 49 #include "content/browser/mock_resource_context.h"
51 #include "content/public/browser/browser_thread.h" 50 #include "content/public/browser/browser_thread.h"
52 #include "content/public/browser/notification_service.h" 51 #include "content/public/browser/notification_service.h"
53 #include "net/base/cookie_monster.h" 52 #include "net/base/cookie_monster.h"
54 #include "net/url_request/url_request_context.h" 53 #include "net/url_request/url_request_context.h"
55 #include "net/url_request/url_request_context_getter.h" 54 #include "net/url_request/url_request_context_getter.h"
56 #include "net/url_request/url_request_test_util.h" 55 #include "net/url_request/url_request_test_util.h"
57 #include "testing/gmock/include/gmock/gmock.h" 56 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 GetInstalledAppForRenderer(renderer_child_id); 587 GetInstalledAppForRenderer(renderer_child_id);
589 if (installed_app != NULL && installed_app->is_storage_isolated()) 588 if (installed_app != NULL && installed_app->is_storage_isolated())
590 return GetRequestContextForIsolatedApp(installed_app->id()); 589 return GetRequestContextForIsolatedApp(installed_app->id());
591 } 590 }
592 591
593 return GetRequestContext(); 592 return GetRequestContext();
594 } 593 }
595 594
596 void TestingProfile::CreateRequestContext() { 595 void TestingProfile::CreateRequestContext() {
597 if (!request_context_) 596 if (!request_context_)
598 request_context_ = new TestURLRequestContextGetter(); 597 request_context_ =
598 new TestURLRequestContextGetter(
599 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
599 } 600 }
600 601
601 void TestingProfile::ResetRequestContext() { 602 void TestingProfile::ResetRequestContext() {
602 request_context_ = NULL; 603 request_context_ = NULL;
603 } 604 }
604 605
605 net::URLRequestContextGetter* TestingProfile::GetRequestContextForMedia() { 606 net::URLRequestContextGetter* TestingProfile::GetRequestContextForMedia() {
606 return NULL; 607 return NULL;
607 } 608 }
608 609
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 760 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
760 return GetExtensionSpecialStoragePolicy(); 761 return GetExtensionSpecialStoragePolicy();
761 } 762 }
762 763
763 void TestingProfile::DestroyWebDataService() { 764 void TestingProfile::DestroyWebDataService() {
764 if (!web_data_service_.get()) 765 if (!web_data_service_.get())
765 return; 766 return;
766 767
767 web_data_service_->Shutdown(); 768 web_data_service_->Shutdown();
768 } 769 }
OLDNEW
« no previous file with comments | « chrome/test/base/test_url_request_context_getter.cc ('k') | content/common/net/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698