| 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 "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #include "chrome/browser/extensions/extension_system_factory.h" | 100 #include "chrome/browser/extensions/extension_system_factory.h" |
| 101 #include "chrome/browser/extensions/test_extension_system.h" | 101 #include "chrome/browser/extensions/test_extension_system.h" |
| 102 #include "components/guest_view/browser/guest_view_manager.h" | 102 #include "components/guest_view/browser/guest_view_manager.h" |
| 103 #include "extensions/browser/event_router_factory.h" | 103 #include "extensions/browser/event_router_factory.h" |
| 104 #include "extensions/browser/extension_prefs.h" | 104 #include "extensions/browser/extension_prefs.h" |
| 105 #include "extensions/browser/extension_prefs_factory.h" | 105 #include "extensions/browser/extension_prefs_factory.h" |
| 106 #include "extensions/browser/extension_system.h" | 106 #include "extensions/browser/extension_system.h" |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 #if defined(OS_ANDROID) | 109 #if defined(OS_ANDROID) |
| 110 #include "chrome/browser/signin/android_profile_oauth2_token_service.h" | 110 #include "chrome/browser/signin/oauth2_token_service_delegate_android.h" |
| 111 #endif | 111 #endif |
| 112 | 112 |
| 113 #if defined(ENABLE_SUPERVISED_USERS) | 113 #if defined(ENABLE_SUPERVISED_USERS) |
| 114 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 114 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
| 115 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 115 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 116 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" | 116 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 using base::Time; | 119 using base::Time; |
| 120 using bookmarks::BookmarkModel; | 120 using bookmarks::BookmarkModel; |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 void TestingProfile::Init() { | 402 void TestingProfile::Init() { |
| 403 // If threads have been initialized, we should be on the UI thread. | 403 // If threads have been initialized, we should be on the UI thread. |
| 404 DCHECK(!content::BrowserThread::IsThreadInitialized( | 404 DCHECK(!content::BrowserThread::IsThreadInitialized( |
| 405 content::BrowserThread::UI) || | 405 content::BrowserThread::UI) || |
| 406 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 406 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 407 | 407 |
| 408 set_is_guest_profile(guest_session_); | 408 set_is_guest_profile(guest_session_); |
| 409 | 409 |
| 410 #if defined(OS_ANDROID) | 410 #if defined(OS_ANDROID) |
| 411 // Make sure token service knows its running in tests. | 411 // Make sure token service knows its running in tests. |
| 412 AndroidProfileOAuth2TokenService::set_is_testing_profile(); | 412 OAuth2TokenServiceDelegateAndroid::set_is_testing_profile(); |
| 413 #endif | 413 #endif |
| 414 | 414 |
| 415 // Normally this would happen during browser startup, but for tests | 415 // Normally this would happen during browser startup, but for tests |
| 416 // we need to trigger creation of Profile-related services. | 416 // we need to trigger creation of Profile-related services. |
| 417 ChromeBrowserMainExtraPartsProfiles:: | 417 ChromeBrowserMainExtraPartsProfiles:: |
| 418 EnsureBrowserContextKeyedServiceFactoriesBuilt(); | 418 EnsureBrowserContextKeyedServiceFactoriesBuilt(); |
| 419 | 419 |
| 420 if (prefs_.get()) | 420 if (prefs_.get()) |
| 421 user_prefs::UserPrefs::Set(this, prefs_.get()); | 421 user_prefs::UserPrefs::Set(this, prefs_.get()); |
| 422 else if (IsOffTheRecord()) | 422 else if (IsOffTheRecord()) |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 #if defined(ENABLE_EXTENSIONS) | 1064 #if defined(ENABLE_EXTENSIONS) |
| 1065 extension_policy_, | 1065 extension_policy_, |
| 1066 #endif | 1066 #endif |
| 1067 pref_service_.Pass(), | 1067 pref_service_.Pass(), |
| 1068 original_profile, | 1068 original_profile, |
| 1069 guest_session_, | 1069 guest_session_, |
| 1070 supervised_user_id_, | 1070 supervised_user_id_, |
| 1071 policy_service_.Pass(), | 1071 policy_service_.Pass(), |
| 1072 testing_factories_); | 1072 testing_factories_); |
| 1073 } | 1073 } |
| OLD | NEW |