| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 content::NotificationService::AllSources()); | 471 content::NotificationService::AllSources()); |
| 472 if (!HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS)) | 472 if (!HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS)) |
| 473 GetTopSites()->HistoryLoaded(); | 473 GetTopSites()->HistoryLoaded(); |
| 474 top_sites_loaded_observer.Wait(); | 474 top_sites_loaded_observer.Wait(); |
| 475 } | 475 } |
| 476 | 476 |
| 477 FilePath TestingProfile::GetPath() { | 477 FilePath TestingProfile::GetPath() { |
| 478 return profile_path_; | 478 return profile_path_; |
| 479 } | 479 } |
| 480 | 480 |
| 481 scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() { |
| 482 return MessageLoop::current()->message_loop_proxy(); |
| 483 } |
| 484 |
| 481 TestingPrefService* TestingProfile::GetTestingPrefService() { | 485 TestingPrefService* TestingProfile::GetTestingPrefService() { |
| 482 if (!prefs_.get()) | 486 if (!prefs_.get()) |
| 483 CreateTestingPrefService(); | 487 CreateTestingPrefService(); |
| 484 DCHECK(testing_prefs_); | 488 DCHECK(testing_prefs_); |
| 485 return testing_prefs_; | 489 return testing_prefs_; |
| 486 } | 490 } |
| 487 | 491 |
| 488 TestingProfile* TestingProfile::AsTestingProfile() { | 492 TestingProfile* TestingProfile::AsTestingProfile() { |
| 489 return this; | 493 return this; |
| 490 } | 494 } |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 832 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
| 829 DCHECK(!build_called_); | 833 DCHECK(!build_called_); |
| 830 build_called_ = true; | 834 build_called_ = true; |
| 831 return scoped_ptr<TestingProfile>(new TestingProfile( | 835 return scoped_ptr<TestingProfile>(new TestingProfile( |
| 832 path_, | 836 path_, |
| 833 delegate_, | 837 delegate_, |
| 834 extension_policy_, | 838 extension_policy_, |
| 835 pref_service_.Pass(), | 839 pref_service_.Pass(), |
| 836 user_cloud_policy_manager_.Pass())); | 840 user_cloud_policy_manager_.Pass())); |
| 837 } | 841 } |
| OLD | NEW |