Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 441623002: Eliminate sending NOTIFICATION_TOP_SITES_* from TopSites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the commit message Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 530
531 static KeyedService* BuildChromeBookmarkClient( 531 static KeyedService* BuildChromeBookmarkClient(
532 content::BrowserContext* context) { 532 content::BrowserContext* context) {
533 return new ChromeBookmarkClient(static_cast<Profile*>(context)); 533 return new ChromeBookmarkClient(static_cast<Profile*>(context));
534 } 534 }
535 535
536 static KeyedService* BuildChromeHistoryClient( 536 static KeyedService* BuildChromeHistoryClient(
537 content::BrowserContext* context) { 537 content::BrowserContext* context) {
538 Profile* profile = static_cast<Profile*>(context); 538 Profile* profile = static_cast<Profile*>(context);
539 return new ChromeHistoryClient(BookmarkModelFactory::GetForProfile(profile)); 539 return new ChromeHistoryClient(BookmarkModelFactory::GetForProfile(profile),
540 profile,
541 profile->GetTopSites());
540 } 542 }
541 543
542 void TestingProfile::CreateBookmarkModel(bool delete_file) { 544 void TestingProfile::CreateBookmarkModel(bool delete_file) {
543 if (delete_file) { 545 if (delete_file) {
544 base::FilePath path = GetPath().Append(bookmarks::kBookmarksFileName); 546 base::FilePath path = GetPath().Append(bookmarks::kBookmarksFileName);
545 base::DeleteFile(path, false); 547 base::DeleteFile(path, false);
546 } 548 }
547 ChromeHistoryClientFactory::GetInstance()->SetTestingFactory( 549 ChromeHistoryClientFactory::GetInstance()->SetTestingFactory(
548 this, BuildChromeHistoryClient); 550 this, BuildChromeHistoryClient);
549 ChromeBookmarkClientFactory::GetInstance()->SetTestingFactory( 551 ChromeBookmarkClientFactory::GetInstance()->SetTestingFactory(
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 #if defined(ENABLE_EXTENSIONS) 984 #if defined(ENABLE_EXTENSIONS)
983 extension_policy_, 985 extension_policy_,
984 #endif 986 #endif
985 pref_service_.Pass(), 987 pref_service_.Pass(),
986 incognito_, 988 incognito_,
987 guest_session_, 989 guest_session_,
988 supervised_user_id_, 990 supervised_user_id_,
989 policy_service_.Pass(), 991 policy_service_.Pass(),
990 testing_factories_)); 992 testing_factories_));
991 } 993 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698