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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 // normally handled by browser_process shutdown. | 510 // normally handled by browser_process shutdown. |
511 if (base::MessageLoop::current()) | 511 if (base::MessageLoop::current()) |
512 base::MessageLoop::current()->RunUntilIdle(); | 512 base::MessageLoop::current()->RunUntilIdle(); |
513 } | 513 } |
514 } | 514 } |
515 | 515 |
516 static KeyedService* BuildBookmarkModel(content::BrowserContext* context) { | 516 static KeyedService* BuildBookmarkModel(content::BrowserContext* context) { |
517 Profile* profile = static_cast<Profile*>(context); | 517 Profile* profile = static_cast<Profile*>(context); |
518 ChromeBookmarkClient* bookmark_client = | 518 ChromeBookmarkClient* bookmark_client = |
519 ChromeBookmarkClientFactory::GetForProfile(profile); | 519 ChromeBookmarkClientFactory::GetForProfile(profile); |
520 BookmarkModel* bookmark_model = new BookmarkModel(bookmark_client, false); | 520 BookmarkModel* bookmark_model = new BookmarkModel(bookmark_client); |
521 bookmark_client->Init(bookmark_model); | 521 bookmark_client->Init(bookmark_model); |
522 bookmark_model->Load(profile->GetPrefs(), | 522 bookmark_model->Load(profile->GetPrefs(), |
523 profile->GetPrefs()->GetString(prefs::kAcceptLanguages), | 523 profile->GetPrefs()->GetString(prefs::kAcceptLanguages), |
524 profile->GetPath(), | 524 profile->GetPath(), |
525 profile->GetIOTaskRunner(), | 525 profile->GetIOTaskRunner(), |
526 content::BrowserThread::GetMessageLoopProxyForThread( | 526 content::BrowserThread::GetMessageLoopProxyForThread( |
527 content::BrowserThread::UI)); | 527 content::BrowserThread::UI)); |
528 return bookmark_model; | 528 return bookmark_model; |
529 } | 529 } |
530 | 530 |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 #if defined(ENABLE_EXTENSIONS) | 982 #if defined(ENABLE_EXTENSIONS) |
983 extension_policy_, | 983 extension_policy_, |
984 #endif | 984 #endif |
985 pref_service_.Pass(), | 985 pref_service_.Pass(), |
986 incognito_, | 986 incognito_, |
987 guest_session_, | 987 guest_session_, |
988 supervised_user_id_, | 988 supervised_user_id_, |
989 policy_service_.Pass(), | 989 policy_service_.Pass(), |
990 testing_factories_)); | 990 testing_factories_)); |
991 } | 991 } |
OLD | NEW |