| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 return last_selected_directory_; | 714 return last_selected_directory_; |
| 715 } | 715 } |
| 716 | 716 |
| 717 void TestingProfile::set_last_selected_directory(const base::FilePath& path) { | 717 void TestingProfile::set_last_selected_directory(const base::FilePath& path) { |
| 718 last_selected_directory_ = path; | 718 last_selected_directory_ = path; |
| 719 } | 719 } |
| 720 | 720 |
| 721 PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() { | 721 PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() { |
| 722 if (!pref_proxy_config_tracker_.get()) { | 722 if (!pref_proxy_config_tracker_.get()) { |
| 723 pref_proxy_config_tracker_.reset( | 723 pref_proxy_config_tracker_.reset( |
| 724 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); | 724 ProxyServiceFactory::CreatePrefProxyConfigTracker(this)); |
| 725 } | 725 } |
| 726 return pref_proxy_config_tracker_.get(); | 726 return pref_proxy_config_tracker_.get(); |
| 727 } | 727 } |
| 728 | 728 |
| 729 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { | 729 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { |
| 730 HistoryService* history_service = | 730 HistoryService* history_service = |
| 731 HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS); | 731 HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS); |
| 732 DCHECK(history_service); | 732 DCHECK(history_service); |
| 733 DCHECK(base::MessageLoop::current()); | 733 DCHECK(base::MessageLoop::current()); |
| 734 | 734 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 | 797 |
| 798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
| 799 DCHECK(!build_called_); | 799 DCHECK(!build_called_); |
| 800 build_called_ = true; | 800 build_called_ = true; |
| 801 return scoped_ptr<TestingProfile>(new TestingProfile( | 801 return scoped_ptr<TestingProfile>(new TestingProfile( |
| 802 path_, | 802 path_, |
| 803 delegate_, | 803 delegate_, |
| 804 extension_policy_, | 804 extension_policy_, |
| 805 pref_service_.Pass())); | 805 pref_service_.Pass())); |
| 806 } | 806 } |
| OLD | NEW |