| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_CLIENT_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "components/keyed_service/core/keyed_service.h" | 12 #include "components/keyed_service/core/keyed_service.h" |
| 13 #include "sql/init_status.h" |
| 13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 14 | 15 |
| 15 namespace history { | 16 namespace history { |
| 16 | 17 |
| 17 struct URLAndTitle { | 18 struct URLAndTitle { |
| 18 GURL url; | 19 GURL url; |
| 19 base::string16 title; | 20 base::string16 title; |
| 20 }; | 21 }; |
| 21 | 22 |
| 22 // This class abstracts operations that depend on the embedder's environment, | 23 // This class abstracts operations that depend on the embedder's environment, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 36 virtual bool IsBookmarked(const GURL& url); | 37 virtual bool IsBookmarked(const GURL& url); |
| 37 | 38 |
| 38 // Returns, by reference in |bookmarks|, the set of bookmarked urls and their | 39 // Returns, by reference in |bookmarks|, the set of bookmarked urls and their |
| 39 // titles. This returns the unique set of URLs. For example, if two bookmarks | 40 // titles. 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 | 41 // reference the same URL only one entry is added even if the title are not |
| 41 // the same. | 42 // the same. |
| 42 // | 43 // |
| 43 // If not on the main thread, then BlockUntilBookmarksLoaded must be called. | 44 // If not on the main thread, then BlockUntilBookmarksLoaded must be called. |
| 44 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks); | 45 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks); |
| 45 | 46 |
| 47 // Notifies the embedder that there was a problem reading the database. |
| 48 // |
| 49 // Must be called from the main thread. |
| 50 virtual void NotifyProfileError(sql::InitStatus init_status); |
| 51 |
| 46 protected: | 52 protected: |
| 47 DISALLOW_COPY_AND_ASSIGN(HistoryClient); | 53 DISALLOW_COPY_AND_ASSIGN(HistoryClient); |
| 48 }; | 54 }; |
| 49 | 55 |
| 50 } // namespace history | 56 } // namespace history |
| 51 | 57 |
| 52 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ | 58 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ |
| OLD | NEW |