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

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

Issue 1924773002: TopSites: filter out non-WebSafe URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@topsites_cleanup
Patch Set: comment Created 4 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
« no previous file with comments | « no previous file | chrome/browser/history/chrome_history_backend_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_BACKEND_CLIENT_H_ 5 #ifndef CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_
6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_ 6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "components/history/core/browser/history_backend_client.h" 10 #include "components/history/core/browser/history_backend_client.h"
11 11
12 namespace bookmarks { 12 namespace bookmarks {
13 class BookmarkModel; 13 class BookmarkModel;
14 } 14 }
15 15
16 // ChromeHistoryBackendClient implements history::HistoryBackendClient interface 16 // ChromeHistoryBackendClient implements history::HistoryBackendClient interface
17 // to provides access to embedder-specific features. 17 // to provides access to embedder-specific features.
18 class ChromeHistoryBackendClient : public history::HistoryBackendClient { 18 class ChromeHistoryBackendClient : public history::HistoryBackendClient {
19 public: 19 public:
20 explicit ChromeHistoryBackendClient(bookmarks::BookmarkModel* bookmark_model); 20 explicit ChromeHistoryBackendClient(bookmarks::BookmarkModel* bookmark_model);
21 ~ChromeHistoryBackendClient() override; 21 ~ChromeHistoryBackendClient() override;
22 22
23 // history::HistoryBackendClient implementation. 23 // history::HistoryBackendClient implementation.
24 bool IsBookmarked(const GURL& url) override; 24 bool IsBookmarked(const GURL& url) override;
25 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override; 25 void GetBookmarks(std::vector<history::URLAndTitle>* bookmarks) override;
26 bool ShouldReportDatabaseError() override; 26 bool ShouldReportDatabaseError() override;
27 bool IsWebSafe(const GURL& url) override;
27 #if defined(OS_ANDROID) 28 #if defined(OS_ANDROID)
28 void OnHistoryBackendInitialized( 29 void OnHistoryBackendInitialized(
29 history::HistoryBackend* history_backend, 30 history::HistoryBackend* history_backend,
30 history::HistoryDatabase* history_database, 31 history::HistoryDatabase* history_database,
31 history::ThumbnailDatabase* thumbnail_database, 32 history::ThumbnailDatabase* thumbnail_database,
32 const base::FilePath& history_dir) override; 33 const base::FilePath& history_dir) override;
33 void OnHistoryBackendDestroyed(history::HistoryBackend* history_backend, 34 void OnHistoryBackendDestroyed(history::HistoryBackend* history_backend,
34 const base::FilePath& history_dir) override; 35 const base::FilePath& history_dir) override;
35 #endif // defined(OS_ANDROID) 36 #endif // defined(OS_ANDROID)
36 37
37 private: 38 private:
38 // BookmarkModel instance providing access to bookmarks. May be null during 39 // BookmarkModel instance providing access to bookmarks. May be null during
39 // testing but must outlive ChromeHistoryBackendClient if non-null. 40 // testing but must outlive ChromeHistoryBackendClient if non-null.
40 bookmarks::BookmarkModel* bookmark_model_; 41 bookmarks::BookmarkModel* bookmark_model_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryBackendClient); 43 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryBackendClient);
43 }; 44 };
44 45
45 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_ 46 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/chrome_history_backend_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698