| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_HISTORY_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // | 93 // |
| 94 // This service is thread safe. Each request callback is invoked in the | 94 // This service is thread safe. Each request callback is invoked in the |
| 95 // thread that made the request. | 95 // thread that made the request. |
| 96 class HistoryService : public CancelableRequestProvider, | 96 class HistoryService : public CancelableRequestProvider, |
| 97 public NotificationObserver, | 97 public NotificationObserver, |
| 98 public base::RefCountedThreadSafe<HistoryService> { | 98 public base::RefCountedThreadSafe<HistoryService> { |
| 99 public: | 99 public: |
| 100 // Miscellaneous commonly-used types. | 100 // Miscellaneous commonly-used types. |
| 101 typedef std::vector<PageUsageData*> PageUsageDataList; | 101 typedef std::vector<PageUsageData*> PageUsageDataList; |
| 102 | 102 |
| 103 // ID (both star_id and folder_id) of the bookmark bar. | |
| 104 // This entry always exists. | |
| 105 static const history::StarID kBookmarkBarID; | |
| 106 | |
| 107 // Must call Init after construction. | 103 // Must call Init after construction. |
| 108 explicit HistoryService(Profile* profile); | 104 explicit HistoryService(Profile* profile); |
| 109 // The empty constructor is provided only for testing. | 105 // The empty constructor is provided only for testing. |
| 110 HistoryService(); | 106 HistoryService(); |
| 111 | 107 |
| 112 // Initializes the history service, returning true on success. On false, do | 108 // Initializes the history service, returning true on success. On false, do |
| 113 // not call any other functions. The given directory will be used for storing | 109 // not call any other functions. The given directory will be used for storing |
| 114 // the history files. The BookmarkService is used when deleting URLs to | 110 // the history files. The BookmarkService is used when deleting URLs to |
| 115 // test if a URL is bookmarked; it may be NULL during testing. | 111 // test if a URL is bookmarked; it may be NULL during testing. |
| 116 bool Init(const FilePath& history_dir, BookmarkService* bookmark_service) { | 112 bool Init(const FilePath& history_dir, BookmarkService* bookmark_service) { |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 BookmarkService* bookmark_service_; | 869 BookmarkService* bookmark_service_; |
| 874 bool no_db_; | 870 bool no_db_; |
| 875 | 871 |
| 876 // True if needs top site migration. | 872 // True if needs top site migration. |
| 877 bool needs_top_sites_migration_; | 873 bool needs_top_sites_migration_; |
| 878 | 874 |
| 879 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 875 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 880 }; | 876 }; |
| 881 | 877 |
| 882 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 878 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
| OLD | NEW |