Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 777 | 777 |
| 778 CancelableRequestConsumer consumer; | 778 CancelableRequestConsumer consumer; |
| 779 history_service->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); | 779 history_service->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); |
| 780 MessageLoop::current()->Run(); | 780 MessageLoop::current()->Run(); |
| 781 } | 781 } |
| 782 | 782 |
| 783 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() { | 783 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() { |
| 784 return NULL; | 784 return NULL; |
| 785 } | 785 } |
| 786 | 786 |
| 787 void TestingProfile::ClearNetworkingHistorySince(base::Time time) { | 787 void TestingProfile::ClearNetworkingHistorySince( |
| 788 NOTIMPLEMENTED(); | 788 base::Time time, |
| 789 const base::Closure& completion) { | |
| 790 if (!completion.is_null()) { | |
| 791 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, completion); | |
|
mmenke
2012/10/25 20:15:52
IMPORTANT: The completion should be run on the UI
engedy
2012/10/25 21:47:43
Duh! Thanks for spotting that.
| |
| 792 } | |
| 789 } | 793 } |
| 790 | 794 |
| 791 GURL TestingProfile::GetHomePage() { | 795 GURL TestingProfile::GetHomePage() { |
| 792 return GURL(chrome::kChromeUINewTabURL); | 796 return GURL(chrome::kChromeUINewTabURL); |
| 793 } | 797 } |
| 794 | 798 |
| 795 PrefService* TestingProfile::GetOffTheRecordPrefs() { | 799 PrefService* TestingProfile::GetOffTheRecordPrefs() { |
| 796 return NULL; | 800 return NULL; |
| 797 } | 801 } |
| 798 | 802 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 846 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 850 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
| 847 DCHECK(!build_called_); | 851 DCHECK(!build_called_); |
| 848 build_called_ = true; | 852 build_called_ = true; |
| 849 return scoped_ptr<TestingProfile>(new TestingProfile( | 853 return scoped_ptr<TestingProfile>(new TestingProfile( |
| 850 path_, | 854 path_, |
| 851 delegate_, | 855 delegate_, |
| 852 extension_policy_, | 856 extension_policy_, |
| 853 pref_service_.Pass(), | 857 pref_service_.Pass(), |
| 854 user_cloud_policy_manager_.Pass())); | 858 user_cloud_policy_manager_.Pass())); |
| 855 } | 859 } |
| OLD | NEW |