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

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

Issue 7859001: Added ability to set ChromeDownloadManagerDelegate for testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various nits from self-review. Created 9 years, 3 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) 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 prerender::PrerenderManager* TestingProfile::GetPrerenderManager() { 779 prerender::PrerenderManager* TestingProfile::GetPrerenderManager() {
780 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 780 if (!prerender::PrerenderManager::IsPrerenderingPossible())
781 return NULL; 781 return NULL;
782 if (!prerender_manager_.get()) { 782 if (!prerender_manager_.get()) {
783 prerender_manager_.reset(new prerender::PrerenderManager( 783 prerender_manager_.reset(new prerender::PrerenderManager(
784 this, g_browser_process->prerender_tracker())); 784 this, g_browser_process->prerender_tracker()));
785 } 785 }
786 return prerender_manager_.get(); 786 return prerender_manager_.get();
787 } 787 }
788 788
789 void TestingProfile::SetDownloadManagerDelegate(
790 ChromeDownloadManagerDelegate* delegate) {
Paweł Hajdan Jr. 2011/09/09 22:11:54 Why empty? This is very surprising.
Randy Smith (Not in Mondays) 2011/09/09 23:45:14 Maybe there's something I'm missing? The implemen
benjhayden 2011/09/12 16:32:25 Maybe just a comment?
Randy Smith (Not in Mondays) 2011/09/12 17:52:58 Waiting on Pawel and will be guided by him.
Paweł Hajdan Jr. 2011/09/12 20:06:44 Not enough. I want to save people time with a debu
Randy Smith (Not in Mondays) 2011/09/13 03:13:18 Done.
jam 2011/09/13 17:18:03 given that GetDownloadManager above doesn't dcheck
791 }
792
789 PrefService* TestingProfile::GetOffTheRecordPrefs() { 793 PrefService* TestingProfile::GetOffTheRecordPrefs() {
790 return NULL; 794 return NULL;
791 } 795 }
792 796
793 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 797 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
794 return GetExtensionSpecialStoragePolicy(); 798 return GetExtensionSpecialStoragePolicy();
795 } 799 }
796 800
797 void TestingProfile::DestroyWebDataService() { 801 void TestingProfile::DestroyWebDataService() {
798 if (!web_data_service_.get()) 802 if (!web_data_service_.get())
799 return; 803 return;
800 804
801 web_data_service_->Shutdown(); 805 web_data_service_->Shutdown();
802 } 806 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698