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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 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 | 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
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } // namespace history 77 } // namespace history
78 78
79 // The history service records page titles, and visit times, as well as 79 // The history service records page titles, and visit times, as well as
80 // (eventually) information about autocomplete. 80 // (eventually) information about autocomplete.
81 // 81 //
82 // This service is thread safe. Each request callback is invoked in the 82 // This service is thread safe. Each request callback is invoked in the
83 // thread that made the request. 83 // thread that made the request.
84 class HistoryService : public CancelableRequestProvider, 84 class HistoryService : public CancelableRequestProvider,
85 public content::NotificationObserver, 85 public content::NotificationObserver,
86 public syncer::SyncableService, 86 public syncer::SyncableService,
87 public ProfileKeyedService, 87 public BrowserContextKeyedService,
88 public visitedlink::VisitedLinkDelegate { 88 public visitedlink::VisitedLinkDelegate {
89 public: 89 public:
90 // Miscellaneous commonly-used types. 90 // Miscellaneous commonly-used types.
91 typedef std::vector<PageUsageData*> PageUsageDataList; 91 typedef std::vector<PageUsageData*> PageUsageDataList;
92 92
93 // Must call Init after construction. 93 // Must call Init after construction.
94 explicit HistoryService(Profile* profile); 94 explicit HistoryService(Profile* profile);
95 // The empty constructor is provided only for testing. 95 // The empty constructor is provided only for testing.
96 HistoryService(); 96 HistoryService();
97 97
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend. 161 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend.
162 // This method should only be called from the history thread, because the 162 // This method should only be called from the history thread, because the
163 // returned service is intended to be accessed only via the history thread. 163 // returned service is intended to be accessed only via the history thread.
164 history::TypedUrlSyncableService* GetTypedUrlSyncableService() const; 164 history::TypedUrlSyncableService* GetTypedUrlSyncableService() const;
165 165
166 // Return the quick history index. 166 // Return the quick history index.
167 history::InMemoryURLIndex* InMemoryIndex() const { 167 history::InMemoryURLIndex* InMemoryIndex() const {
168 return in_memory_url_index_.get(); 168 return in_memory_url_index_.get();
169 } 169 }
170 170
171 // ProfileKeyedService: 171 // BrowserContextKeyedService:
172 virtual void Shutdown() OVERRIDE; 172 virtual void Shutdown() OVERRIDE;
173 173
174 // Navigation ---------------------------------------------------------------- 174 // Navigation ----------------------------------------------------------------
175 175
176 // Adds the given canonical URL to history with the given time as the visit 176 // Adds the given canonical URL to history with the given time as the visit
177 // time. Referrer may be the empty string. 177 // time. Referrer may be the empty string.
178 // 178 //
179 // The supplied render process host is used to scope the given page ID. Page 179 // The supplied render process host is used to scope the given page ID. Page
180 // IDs are only unique inside a given render process, so we need that to 180 // IDs are only unique inside a given render process, so we need that to
181 // differentiate them. This pointer should not be dereferenced by the history 181 // differentiate them. This pointer should not be dereferenced by the history
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 1091 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
1092 1092
1093 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 1093 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
1094 1094
1095 history::DeleteDirectiveHandler delete_directive_handler_; 1095 history::DeleteDirectiveHandler delete_directive_handler_;
1096 1096
1097 DISALLOW_COPY_AND_ASSIGN(HistoryService); 1097 DISALLOW_COPY_AND_ASSIGN(HistoryService);
1098 }; 1098 };
1099 1099
1100 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 1100 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698