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

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

Issue 8135017: Refactor downloads into a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated latest rounds of comments from John. Created 9 years, 2 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 | « chrome/test/base/testing_profile.h ('k') | content/browser/browser_context.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 } 558 }
559 559
560 void TestingProfile::SetQuotaManager(quota::QuotaManager* manager) { 560 void TestingProfile::SetQuotaManager(quota::QuotaManager* manager) {
561 quota_manager_ = manager; 561 quota_manager_ = manager;
562 } 562 }
563 563
564 quota::QuotaManager* TestingProfile::GetQuotaManager() { 564 quota::QuotaManager* TestingProfile::GetQuotaManager() {
565 return quota_manager_.get(); 565 return quota_manager_.get();
566 } 566 }
567 567
568 bool TestingProfile::HasCreatedDownloadManager() const {
569 return false;
570 }
571
572 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { 568 net::URLRequestContextGetter* TestingProfile::GetRequestContext() {
573 return request_context_.get(); 569 return request_context_.get();
574 } 570 }
575 571
576 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess( 572 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess(
577 int renderer_child_id) { 573 int renderer_child_id) {
578 if (extension_service_.get()) { 574 if (extension_service_.get()) {
579 const Extension* installed_app = extension_service_-> 575 const Extension* installed_app = extension_service_->
580 GetInstalledAppForRenderer(renderer_child_id); 576 GetInstalledAppForRenderer(renderer_child_id);
581 if (installed_app != NULL && installed_app->is_storage_isolated()) 577 if (installed_app != NULL && installed_app->is_storage_isolated())
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 } 766 }
771 767
772 ChromeURLDataManager* TestingProfile::GetChromeURLDataManager() { 768 ChromeURLDataManager* TestingProfile::GetChromeURLDataManager() {
773 if (!chrome_url_data_manager_.get()) 769 if (!chrome_url_data_manager_.get())
774 chrome_url_data_manager_.reset( 770 chrome_url_data_manager_.reset(
775 new ChromeURLDataManager( 771 new ChromeURLDataManager(
776 base::Callback<ChromeURLDataManagerBackend*(void)>())); 772 base::Callback<ChromeURLDataManagerBackend*(void)>()));
777 return chrome_url_data_manager_.get(); 773 return chrome_url_data_manager_.get();
778 } 774 }
779 775
780 void TestingProfile::SetDownloadManagerDelegate(
781 ChromeDownloadManagerDelegate* delegate) {
782 // Specially marked so errors from use will occur near to the site
783 // of the error.
784 NOTIMPLEMENTED();
785 }
786
787 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() { 776 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() {
788 return NULL; 777 return NULL;
789 } 778 }
790 779
791 void TestingProfile::DeleteTransportSecurityStateSince(base::Time time) { 780 void TestingProfile::DeleteTransportSecurityStateSince(base::Time time) {
792 NOTIMPLEMENTED(); 781 NOTIMPLEMENTED();
793 } 782 }
794 783
795 PrefService* TestingProfile::GetOffTheRecordPrefs() { 784 PrefService* TestingProfile::GetOffTheRecordPrefs() {
796 return NULL; 785 return NULL;
797 } 786 }
798 787
799 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 788 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
800 return GetExtensionSpecialStoragePolicy(); 789 return GetExtensionSpecialStoragePolicy();
801 } 790 }
802 791
803 void TestingProfile::DestroyWebDataService() { 792 void TestingProfile::DestroyWebDataService() {
804 if (!web_data_service_.get()) 793 if (!web_data_service_.get())
805 return; 794 return;
806 795
807 web_data_service_->Shutdown(); 796 web_data_service_->Shutdown();
808 } 797 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | content/browser/browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698