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

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

Issue 12703036: [Sync] Add interface and backend impl for typed URL syncable service (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style and move logic into BroadcastNotifications Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/observer_list.h" 19 #include "base/observer_list.h"
20 #include "base/string16.h" 20 #include "base/string16.h"
21 #include "base/threading/thread_checker.h" 21 #include "base/threading/thread_checker.h"
22 #include "base/time.h" 22 #include "base/time.h"
23 #include "chrome/browser/common/cancelable_request.h" 23 #include "chrome/browser/common/cancelable_request.h"
24 #include "chrome/browser/favicon/favicon_service.h" 24 #include "chrome/browser/favicon/favicon_service.h"
25 #include "chrome/browser/history/delete_directive_handler.h" 25 #include "chrome/browser/history/delete_directive_handler.h"
26 #include "chrome/browser/history/history_types.h" 26 #include "chrome/browser/history/history_types.h"
27 #include "chrome/browser/history/typed_url_syncable_service.h"
27 #include "chrome/browser/profiles/profile_keyed_service.h" 28 #include "chrome/browser/profiles/profile_keyed_service.h"
28 #include "chrome/browser/search_engines/template_url_id.h" 29 #include "chrome/browser/search_engines/template_url_id.h"
29 #include "chrome/common/cancelable_task_tracker.h" 30 #include "chrome/common/cancelable_task_tracker.h"
30 #include "chrome/common/ref_counted_util.h" 31 #include "chrome/common/ref_counted_util.h"
31 #include "components/visitedlink/browser/visitedlink_delegate.h" 32 #include "components/visitedlink/browser/visitedlink_delegate.h"
32 #include "content/public/browser/notification_observer.h" 33 #include "content/public/browser/notification_observer.h"
33 #include "content/public/browser/notification_registrar.h" 34 #include "content/public/browser/notification_registrar.h"
34 #include "content/public/common/page_transition_types.h" 35 #include "content/public/common/page_transition_types.h"
35 #include "sql/init_status.h" 36 #include "sql/init_status.h"
36 #include "sync/api/syncable_service.h" 37 #include "sync/api/syncable_service.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 152
152 // Reads the number of times the user has typed the given URL. 153 // Reads the number of times the user has typed the given URL.
153 bool GetTypedCountForURL(const GURL& url, int* typed_count); 154 bool GetTypedCountForURL(const GURL& url, int* typed_count);
154 155
155 // Reads the last visit time for the given URL. 156 // Reads the last visit time for the given URL.
156 bool GetLastVisitTimeForURL(const GURL& url, base::Time* last_visit); 157 bool GetLastVisitTimeForURL(const GURL& url, base::Time* last_visit);
157 158
158 // Reads the number of times this URL has been visited. 159 // Reads the number of times this URL has been visited.
159 bool GetVisitCountForURL(const GURL& url, int* visit_count); 160 bool GetVisitCountForURL(const GURL& url, int* visit_count);
160 161
162 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend
163 history::TypedUrlSyncableService* GetTypedUrlSyncableService() const;
Andrew T Wilson (Slow) 2013/04/10 08:43:22 nit: sentence punctuation, and also add comment ar
164
161 // Return the quick history index. 165 // Return the quick history index.
162 history::InMemoryURLIndex* InMemoryIndex() const { 166 history::InMemoryURLIndex* InMemoryIndex() const {
163 return in_memory_url_index_.get(); 167 return in_memory_url_index_.get();
164 } 168 }
165 169
166 // ProfileKeyedService: 170 // ProfileKeyedService:
167 virtual void Shutdown() OVERRIDE; 171 virtual void Shutdown() OVERRIDE;
168 172
169 // Navigation ---------------------------------------------------------------- 173 // Navigation ----------------------------------------------------------------
170 174
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 1090 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
1087 1091
1088 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 1092 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
1089 1093
1090 history::DeleteDirectiveHandler delete_directive_handler_; 1094 history::DeleteDirectiveHandler delete_directive_handler_;
1091 1095
1092 DISALLOW_COPY_AND_ASSIGN(HistoryService); 1096 DISALLOW_COPY_AND_ASSIGN(HistoryService);
1093 }; 1097 };
1094 1098
1095 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 1099 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698