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

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

Issue 1198373002: Split HistoryClient in two objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1192403002
Patch Set: Add comments in ChromeHistoryBackendClient Created 5 years, 6 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 2015 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_BACKEND_CLIENT_H_
6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_
7
8 #include "base/macros.h"
9 #include "components/history/core/browser/history_backend_client.h"
10
11 namespace bookmarks {
12 class BookmarkModel;
13 }
14
15 // ChromeHistoryBackendClient implements history::HistoryBackendClient interface
16 // to provides access to embedder-specific features.
17 class ChromeHistoryBackendClient : public history::HistoryBackendClient {
18 public:
19 explicit ChromeHistoryBackendClient(bookmarks::BookmarkModel* bookmark_model);
20 ~ChromeHistoryBackendClient() override;
21
22 // history::HistoryBackendClient implementation.
23 bool IsBookmarked(const GURL& url) override;
24 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override;
25 bool ShouldReportDatabaseError() override;
26 #if defined(OS_ANDROID)
27 void OnHistoryBackendInitialized(
28 history::HistoryBackend* history_backend,
29 history::HistoryDatabase* history_database,
30 history::ThumbnailDatabase* thumbnail_database,
31 const base::FilePath& history_dir) override;
32 void OnHistoryBackendDestroyed(history::HistoryBackend* history_backend,
33 const base::FilePath& history_dir) override;
34 #endif // defined(OS_ANDROID)
35
36 private:
37 // BookmarkModel instance providing access to bookmarks. May be null during
38 // testing but must outlive ChromeHistoryBackendClient if non-null.
39 bookmarks::BookmarkModel* bookmark_model_;
40
41 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryBackendClient);
42 };
43
44 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698