OLD | NEW |
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 BookmarkModel; | 11 class BookmarkModel; |
12 | 12 |
13 // This class implements history::HistoryClient to abstract operations that | 13 // This class implements history::HistoryClient to abstract operations that |
14 // depend on Chrome environment. | 14 // depend on Chrome environment. |
15 class ChromeHistoryClient : public history::HistoryClient { | 15 class ChromeHistoryClient : public history::HistoryClient { |
16 public: | 16 public: |
17 explicit ChromeHistoryClient(BookmarkModel* bookmark_model); | 17 explicit ChromeHistoryClient(BookmarkModel* bookmark_model); |
18 | 18 |
19 // history::HistoryClient: | 19 // history::HistoryClient: |
20 virtual void BlockUntilBookmarksLoaded() OVERRIDE; | 20 virtual void BlockUntilBookmarksLoaded() OVERRIDE; |
21 virtual bool IsBookmarked(const GURL& url) OVERRIDE; | 21 virtual bool IsBookmarked(const GURL& url) OVERRIDE; |
22 virtual void GetBookmarks( | 22 virtual void GetBookmarks( |
23 std::vector<history::URLAndTitle>* bookmarks) OVERRIDE; | 23 std::vector<history::URLAndTitle>* bookmarks) OVERRIDE; |
| 24 virtual void NotifyProfileError(sql::InitStatus init_status) OVERRIDE; |
24 | 25 |
25 // KeyedService: | 26 // KeyedService: |
26 virtual void Shutdown() OVERRIDE; | 27 virtual void Shutdown() OVERRIDE; |
27 | 28 |
28 private: | 29 private: |
29 // The BookmarkModel, this should outlive ChromeHistoryClient. | 30 // The BookmarkModel, this should outlive ChromeHistoryClient. |
30 BookmarkModel* bookmark_model_; | 31 BookmarkModel* bookmark_model_; |
31 | 32 |
32 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient); | 33 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient); |
33 }; | 34 }; |
34 | 35 |
35 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ | 36 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ |
OLD | NEW |