OLD | NEW |
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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_CLIENT_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_CLIENT_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_CLIENT_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 // Returns, by reference in |bookmarks|, the set of bookmarked URLs and their | 38 // Returns, by reference in |bookmarks|, the set of bookmarked URLs and their |
39 // title. This returns the unique set of URLs. For example, if two bookmarks | 39 // title. This returns the unique set of URLs. For example, if two bookmarks |
40 // reference the same URL only one entry is added even if the title are not | 40 // reference the same URL only one entry is added even if the title are not |
41 // the same. | 41 // the same. |
42 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) = 0; | 42 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) = 0; |
43 | 43 |
44 // Returns whether database errors should be reported to the crash server. | 44 // Returns whether database errors should be reported to the crash server. |
45 virtual bool ShouldReportDatabaseError() = 0; | 45 virtual bool ShouldReportDatabaseError() = 0; |
46 | 46 |
| 47 // Returns whether |url| should be considered web-safe (see |
| 48 // content::ChildProcessSecurityPolicy). |
| 49 virtual bool IsWebSafe(const GURL& url) = 0; |
| 50 |
47 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
48 // Called upon initialization of the HistoryBackend. | 52 // Called upon initialization of the HistoryBackend. |
49 virtual void OnHistoryBackendInitialized( | 53 virtual void OnHistoryBackendInitialized( |
50 HistoryBackend* history_backend, | 54 HistoryBackend* history_backend, |
51 HistoryDatabase* history_database, | 55 HistoryDatabase* history_database, |
52 ThumbnailDatabase* thumbnail_database, | 56 ThumbnailDatabase* thumbnail_database, |
53 const base::FilePath& history_dir) = 0; | 57 const base::FilePath& history_dir) = 0; |
54 | 58 |
55 // Called upon destruction of the HistoryBackend. | 59 // Called upon destruction of the HistoryBackend. |
56 virtual void OnHistoryBackendDestroyed(HistoryBackend* history_backend, | 60 virtual void OnHistoryBackendDestroyed(HistoryBackend* history_backend, |
57 const base::FilePath& history_dir) = 0; | 61 const base::FilePath& history_dir) = 0; |
58 #endif // defined(OS_ANDROID) | 62 #endif // defined(OS_ANDROID) |
59 | 63 |
60 private: | 64 private: |
61 DISALLOW_COPY_AND_ASSIGN(HistoryBackendClient); | 65 DISALLOW_COPY_AND_ASSIGN(HistoryBackendClient); |
62 }; | 66 }; |
63 | 67 |
64 } // namespace history | 68 } // namespace history |
65 | 69 |
66 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_CLIENT_H_ | 70 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_CLIENT_H_ |
OLD | NEW |