OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ | |
6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "chrome/browser/history/history_service.h" | |
Jiang Jiang
2014/05/19 21:51:50
Forward declare is enough.
sdefresne
2014/05/23 10:02:49
Done.
| |
10 #include "components/history/core/browser/history_client.h" | |
11 #include "components/keyed_service/core/keyed_service.h" | |
12 | |
13 class Profile; | |
14 class HistoryService; | |
15 | |
16 namespace history { | |
17 | |
18 class ChromeHistoryClient : public HistoryClient, | |
19 public KeyedService { | |
20 public: | |
21 ChromeHistoryClient(Profile* profile); | |
22 | |
23 HistoryService* history_service() { | |
Jiang Jiang
2014/05/19 21:51:50
Should be a const?
sdefresne
2014/05/23 10:02:49
Done.
| |
24 return history_service_.get(); | |
25 } | |
26 | |
27 // HistoryClient: | |
28 virtual bool IsBookmarked(const GURL& url) OVERRIDE; | |
29 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE; | |
30 | |
31 // KeyedService: | |
32 virtual void Shutdown() OVERRIDE; | |
33 | |
34 private: | |
35 scoped_ptr<HistoryService> history_service_; | |
36 Profile* profile_; | |
37 }; | |
38 | |
39 } // namespace history | |
40 | |
41 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ | |
OLD | NEW |