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

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

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 6 years, 7 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
(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/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/history/core/browser/history_client.h"
11 #include "components/keyed_service/core/keyed_service.h"
12
13 class Profile;
14 class BookmarkModel;
15 class HistoryService;
16
17 namespace history {
18
19 class ChromeHistoryClient : public HistoryClient,
20 public KeyedService {
21 public:
22 explicit ChromeHistoryClient(Profile* profile);
23
24 HistoryService* history_service() const {
25 return history_service_.get();
26 }
27
28 // HistoryClient:
29 virtual void BlockTillBookmarksLoaded() OVERRIDE;
30 virtual bool IsBookmarked(const GURL& url) OVERRIDE;
31 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE;
32
33 // KeyedService:
34 virtual void Shutdown() OVERRIDE;
35
36 private:
37 scoped_ptr<HistoryService> history_service_;
38 BookmarkModel* bookmark_model_;
39
40 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient);
41 };
42
43 } // namespace history
44
45 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698