| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) { | 136 ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) { |
| 137 #if defined(ENABLE_NOTIFICATIONS) | 137 #if defined(ENABLE_NOTIFICATIONS) |
| 138 return new DesktopNotificationService(profile, NULL); | 138 return new DesktopNotificationService(profile, NULL); |
| 139 #else | 139 #else |
| 140 return NULL; | 140 return NULL; |
| 141 #endif | 141 #endif |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace | 144 } // namespace |
| 145 | 145 |
| 146 // static |
| 147 #if defined(OS_CHROMEOS) |
| 148 // Must be kept in sync with |
| 149 // ChromeBrowserMainPartsChromeos::PreEarlyInitialization. |
| 150 const char TestingProfile::kTestUserProfileDir[] = "test-user"; |
| 151 #else |
| 152 const char TestingProfile::kTestUserProfileDir[] = "Default"; |
| 153 #endif |
| 154 |
| 146 TestingProfile::TestingProfile() | 155 TestingProfile::TestingProfile() |
| 147 : start_time_(Time::Now()), | 156 : start_time_(Time::Now()), |
| 148 testing_prefs_(NULL), | 157 testing_prefs_(NULL), |
| 149 incognito_(false), | 158 incognito_(false), |
| 150 last_session_exited_cleanly_(true), | 159 last_session_exited_cleanly_(true), |
| 151 profile_dependency_manager_(ProfileDependencyManager::GetInstance()), | 160 profile_dependency_manager_(ProfileDependencyManager::GetInstance()), |
| 152 delegate_(NULL) { | 161 delegate_(NULL) { |
| 153 if (!temp_dir_.CreateUniqueTempDir()) { | 162 if (!temp_dir_.CreateUniqueTempDir()) { |
| 154 LOG(ERROR) << "Failed to create unique temporary directory."; | 163 LOG(ERROR) << "Failed to create unique temporary directory."; |
| 155 | 164 |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 } | 735 } |
| 727 | 736 |
| 728 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { | 737 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { |
| 729 return true; | 738 return true; |
| 730 } | 739 } |
| 731 | 740 |
| 732 base::Callback<ChromeURLDataManagerBackend*(void)> | 741 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 733 TestingProfile::GetChromeURLDataManagerBackendGetter() const { | 742 TestingProfile::GetChromeURLDataManagerBackendGetter() const { |
| 734 return base::Callback<ChromeURLDataManagerBackend*(void)>(); | 743 return base::Callback<ChromeURLDataManagerBackend*(void)>(); |
| 735 } | 744 } |
| OLD | NEW |