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

Side by Side Diff: chrome/browser/history/chrome_history_client_factory.cc

Issue 441623002: Eliminate sending NOTIFICATION_TOP_SITES_* from TopSites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix incorrect parmeter being passed in notification Created 6 years, 3 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
« no previous file with comments | « chrome/browser/history/chrome_history_client.cc ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/history/chrome_history_client_factory.h" 5 #include "chrome/browser/history/chrome_history_client_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
9 #include "chrome/browser/history/chrome_history_client.h" 9 #include "chrome/browser/history/chrome_history_client.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 17 matching lines...) Expand all
28 "ChromeHistoryClient", 28 "ChromeHistoryClient",
29 BrowserContextDependencyManager::GetInstance()) { 29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(BookmarkModelFactory::GetInstance()); 30 DependsOn(BookmarkModelFactory::GetInstance());
31 } 31 }
32 32
33 ChromeHistoryClientFactory::~ChromeHistoryClientFactory() { 33 ChromeHistoryClientFactory::~ChromeHistoryClientFactory() {
34 } 34 }
35 35
36 KeyedService* ChromeHistoryClientFactory::BuildServiceInstanceFor( 36 KeyedService* ChromeHistoryClientFactory::BuildServiceInstanceFor(
37 content::BrowserContext* context) const { 37 content::BrowserContext* context) const {
38 return new ChromeHistoryClient( 38 Profile* profile = static_cast<Profile*>(context);
39 BookmarkModelFactory::GetForProfile(static_cast<Profile*>(context))); 39 return new ChromeHistoryClient(BookmarkModelFactory::GetForProfile(profile),
40 profile,
41 profile->GetTopSites());
40 } 42 }
41 43
42 content::BrowserContext* ChromeHistoryClientFactory::GetBrowserContextToUse( 44 content::BrowserContext* ChromeHistoryClientFactory::GetBrowserContextToUse(
43 content::BrowserContext* context) const { 45 content::BrowserContext* context) const {
44 return chrome::GetBrowserContextRedirectedInIncognito(context); 46 return chrome::GetBrowserContextRedirectedInIncognito(context);
45 } 47 }
46 48
47 bool ChromeHistoryClientFactory::ServiceIsNULLWhileTesting() const { 49 bool ChromeHistoryClientFactory::ServiceIsNULLWhileTesting() const {
48 return true; 50 return true;
49 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/history/chrome_history_client.cc ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698