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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 } | 513 } |
514 | 514 |
515 Profile* TestingProfile::GetOriginalProfile() { | 515 Profile* TestingProfile::GetOriginalProfile() { |
516 return this; | 516 return this; |
517 } | 517 } |
518 | 518 |
519 ExtensionService* TestingProfile::GetExtensionService() { | 519 ExtensionService* TestingProfile::GetExtensionService() { |
520 return extensions::ExtensionSystem::Get(this)->extension_service(); | 520 return extensions::ExtensionSystem::Get(this)->extension_service(); |
521 } | 521 } |
522 | 522 |
523 extensions::EventRouter* TestingProfile::GetExtensionEventRouter() { | |
524 return extensions::ExtensionSystem::Get(this)->event_router(); | |
525 } | |
526 | |
527 void TestingProfile::SetExtensionSpecialStoragePolicy( | 523 void TestingProfile::SetExtensionSpecialStoragePolicy( |
528 ExtensionSpecialStoragePolicy* extension_special_storage_policy) { | 524 ExtensionSpecialStoragePolicy* extension_special_storage_policy) { |
529 extension_special_storage_policy_ = extension_special_storage_policy; | 525 extension_special_storage_policy_ = extension_special_storage_policy; |
530 } | 526 } |
531 | 527 |
532 ExtensionSpecialStoragePolicy* | 528 ExtensionSpecialStoragePolicy* |
533 TestingProfile::GetExtensionSpecialStoragePolicy() { | 529 TestingProfile::GetExtensionSpecialStoragePolicy() { |
534 if (!extension_special_storage_policy_.get()) | 530 if (!extension_special_storage_policy_.get()) |
535 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(NULL); | 531 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(NULL); |
536 return extension_special_storage_policy_.get(); | 532 return extension_special_storage_policy_.get(); |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 831 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
836 DCHECK(!build_called_); | 832 DCHECK(!build_called_); |
837 build_called_ = true; | 833 build_called_ = true; |
838 return scoped_ptr<TestingProfile>(new TestingProfile( | 834 return scoped_ptr<TestingProfile>(new TestingProfile( |
839 path_, | 835 path_, |
840 delegate_, | 836 delegate_, |
841 extension_policy_, | 837 extension_policy_, |
842 pref_service_.Pass(), | 838 pref_service_.Pass(), |
843 user_cloud_policy_manager_.Pass())); | 839 user_cloud_policy_manager_.Pass())); |
844 } | 840 } |
OLD | NEW |