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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // TopSitesImpl::Shutdown schedules some tasks (from TopSitesBackend) that | 487 // TopSitesImpl::Shutdown schedules some tasks (from TopSitesBackend) that |
488 // need to be run to properly shutdown. Run all pending tasks now. This is | 488 // need to be run to properly shutdown. Run all pending tasks now. This is |
489 // normally handled by browser_process shutdown. | 489 // normally handled by browser_process shutdown. |
490 if (base::MessageLoop::current()) | 490 if (base::MessageLoop::current()) |
491 base::MessageLoop::current()->RunUntilIdle(); | 491 base::MessageLoop::current()->RunUntilIdle(); |
492 } | 492 } |
493 } | 493 } |
494 | 494 |
495 static KeyedService* BuildBookmarkModel(content::BrowserContext* context) { | 495 static KeyedService* BuildBookmarkModel(content::BrowserContext* context) { |
496 Profile* profile = static_cast<Profile*>(context); | 496 Profile* profile = static_cast<Profile*>(context); |
497 BookmarkModel* bookmark_model = new BookmarkModel(profile); | 497 BookmarkModel* bookmark_model = new BookmarkModel(profile, false); |
498 bookmark_model->Load(profile->GetIOTaskRunner()); | 498 bookmark_model->Load(profile->GetIOTaskRunner()); |
499 return bookmark_model; | 499 return bookmark_model; |
500 } | 500 } |
501 | 501 |
502 void TestingProfile::CreateBookmarkModel(bool delete_file) { | 502 void TestingProfile::CreateBookmarkModel(bool delete_file) { |
503 if (delete_file) { | 503 if (delete_file) { |
504 base::FilePath path = GetPath().Append(bookmarks::kBookmarksFileName); | 504 base::FilePath path = GetPath().Append(bookmarks::kBookmarksFileName); |
505 base::DeleteFile(path, false); | 505 base::DeleteFile(path, false); |
506 } | 506 } |
507 // This will create a bookmark model. | 507 // This will create a bookmark model. |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 path_, | 963 path_, |
964 delegate_, | 964 delegate_, |
965 extension_policy_, | 965 extension_policy_, |
966 pref_service_.Pass(), | 966 pref_service_.Pass(), |
967 incognito_, | 967 incognito_, |
968 guest_session_, | 968 guest_session_, |
969 managed_user_id_, | 969 managed_user_id_, |
970 policy_service_.Pass(), | 970 policy_service_.Pass(), |
971 testing_factories_)); | 971 testing_factories_)); |
972 } | 972 } |
OLD | NEW |