| 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/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 history::HistoryService* history_service = new history::HistoryService( | 224 history::HistoryService* history_service = new history::HistoryService( |
| 225 ChromeHistoryClientFactory::GetForProfile(profile), | 225 ChromeHistoryClientFactory::GetForProfile(profile), |
| 226 scoped_ptr<history::VisitDelegate>( | 226 scoped_ptr<history::VisitDelegate>( |
| 227 new history::ContentVisitDelegate(profile))); | 227 new history::ContentVisitDelegate(profile))); |
| 228 return history_service; | 228 return history_service; |
| 229 } | 229 } |
| 230 | 230 |
| 231 KeyedService* BuildInMemoryURLIndex(content::BrowserContext* context) { | 231 KeyedService* BuildInMemoryURLIndex(content::BrowserContext* context) { |
| 232 Profile* profile = Profile::FromBrowserContext(context); | 232 Profile* profile = Profile::FromBrowserContext(context); |
| 233 InMemoryURLIndex* in_memory_url_index = new InMemoryURLIndex( | 233 InMemoryURLIndex* in_memory_url_index = new InMemoryURLIndex( |
| 234 BookmarkModelFactory::GetForProfile(profile), |
| 234 HistoryServiceFactory::GetForProfile(profile, | 235 HistoryServiceFactory::GetForProfile(profile, |
| 235 ServiceAccessType::EXPLICIT_ACCESS), | 236 ServiceAccessType::EXPLICIT_ACCESS), |
| 236 profile->GetPath(), | 237 profile->GetPath(), |
| 237 profile->GetPrefs()->GetString(prefs::kAcceptLanguages)); | 238 profile->GetPrefs()->GetString(prefs::kAcceptLanguages)); |
| 238 in_memory_url_index->Init(); | 239 in_memory_url_index->Init(); |
| 239 return in_memory_url_index; | 240 return in_memory_url_index; |
| 240 } | 241 } |
| 241 | 242 |
| 242 KeyedService* BuildBookmarkModel(content::BrowserContext* context) { | 243 KeyedService* BuildBookmarkModel(content::BrowserContext* context) { |
| 243 Profile* profile = static_cast<Profile*>(context); | 244 Profile* profile = static_cast<Profile*>(context); |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 #if defined(ENABLE_EXTENSIONS) | 1123 #if defined(ENABLE_EXTENSIONS) |
| 1123 extension_policy_, | 1124 extension_policy_, |
| 1124 #endif | 1125 #endif |
| 1125 pref_service_.Pass(), | 1126 pref_service_.Pass(), |
| 1126 original_profile, | 1127 original_profile, |
| 1127 guest_session_, | 1128 guest_session_, |
| 1128 supervised_user_id_, | 1129 supervised_user_id_, |
| 1129 policy_service_.Pass(), | 1130 policy_service_.Pass(), |
| 1130 testing_factories_); | 1131 testing_factories_); |
| 1131 } | 1132 } |
| OLD | NEW |