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

Side by Side Diff: chrome/browser/history/chrome_history_client.h

Issue 861273002: Make TopSites a RefcountedKeyedService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compilation Created 5 years, 11 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 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 #ifndef CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ 5 #ifndef CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ 6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/history/core/browser/history_client.h" 9 #include "components/history/core/browser/history_client.h"
10 10
11 class HistoryService;
12 class Profile;
13
14 namespace bookmarks { 11 namespace bookmarks {
15 class BookmarkModel; 12 class BookmarkModel;
16 } 13 }
17 14
18 // This class implements history::HistoryClient to abstract operations that 15 // This class implements history::HistoryClient to abstract operations that
19 // depend on Chrome environment. 16 // depend on Chrome environment.
20 class ChromeHistoryClient : public history::HistoryClient { 17 class ChromeHistoryClient : public history::HistoryClient {
21 public: 18 public:
22 explicit ChromeHistoryClient(bookmarks::BookmarkModel* bookmark_model); 19 explicit ChromeHistoryClient(bookmarks::BookmarkModel* bookmark_model);
23 ~ChromeHistoryClient() override; 20 ~ChromeHistoryClient() override;
24 21
25 // history::HistoryClient: 22 // history::HistoryClient:
26 void BlockUntilBookmarksLoaded() override; 23 void BlockUntilBookmarksLoaded() override;
27 bool IsBookmarked(const GURL& url) override; 24 bool IsBookmarked(const GURL& url) override;
28 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override; 25 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override;
29 void NotifyProfileError(sql::InitStatus init_status) override; 26 void NotifyProfileError(sql::InitStatus init_status) override;
30 bool ShouldReportDatabaseError() override; 27 bool ShouldReportDatabaseError() override;
31 28
32 // KeyedService: 29 // KeyedService:
33 void Shutdown() override; 30 void Shutdown() override;
34 31
35 private: 32 private:
36 // The BookmarkModel, this should outlive ChromeHistoryClient. 33 // The BookmarkModel, this should outlive ChromeHistoryClient.
37 bookmarks::BookmarkModel* bookmark_model_; 34 bookmarks::BookmarkModel* bookmark_model_;
38 35
39 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient); 36 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient);
40 }; 37 };
41 38
42 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ 39 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698