| 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 <utility> | 7 #include <utility> |
| 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 return guest_view::GuestViewManager::FromBrowserContext(this); | 860 return guest_view::GuestViewManager::FromBrowserContext(this); |
| 861 #else | 861 #else |
| 862 return NULL; | 862 return NULL; |
| 863 #endif | 863 #endif |
| 864 } | 864 } |
| 865 | 865 |
| 866 content::PushMessagingService* TestingProfile::GetPushMessagingService() { | 866 content::PushMessagingService* TestingProfile::GetPushMessagingService() { |
| 867 return NULL; | 867 return NULL; |
| 868 } | 868 } |
| 869 | 869 |
| 870 bool TestingProfile::IsSameProfile(Profile *p) { | 870 bool TestingProfile::IsSameProfile(Profile *profile) { |
| 871 return this == p; | 871 if (this == profile) |
| 872 return true; |
| 873 Profile* otr_profile = incognito_profile_.get(); |
| 874 return otr_profile && profile == otr_profile; |
| 872 } | 875 } |
| 873 | 876 |
| 874 base::Time TestingProfile::GetStartTime() const { | 877 base::Time TestingProfile::GetStartTime() const { |
| 875 return start_time_; | 878 return start_time_; |
| 876 } | 879 } |
| 877 | 880 |
| 878 base::FilePath TestingProfile::last_selected_directory() { | 881 base::FilePath TestingProfile::last_selected_directory() { |
| 879 return last_selected_directory_; | 882 return last_selected_directory_; |
| 880 } | 883 } |
| 881 | 884 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 // Note: Owned by |original_profile|. | 1072 // Note: Owned by |original_profile|. |
| 1070 return new TestingProfile(path_, delegate_, | 1073 return new TestingProfile(path_, delegate_, |
| 1071 #if defined(ENABLE_EXTENSIONS) | 1074 #if defined(ENABLE_EXTENSIONS) |
| 1072 extension_policy_, | 1075 extension_policy_, |
| 1073 #endif | 1076 #endif |
| 1074 std::move(pref_service_), original_profile, | 1077 std::move(pref_service_), original_profile, |
| 1075 guest_session_, supervised_user_id_, | 1078 guest_session_, supervised_user_id_, |
| 1076 std::move(policy_service_), testing_factories_, | 1079 std::move(policy_service_), testing_factories_, |
| 1077 profile_name_); | 1080 profile_name_); |
| 1078 } | 1081 } |
| OLD | NEW |