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

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

Issue 7104088: Changed typed url sync to no longer modify typed/visit_count. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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) 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_BACKEND_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request); 275 void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request);
276 276
277 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls); 277 virtual bool GetAllTypedURLs(std::vector<history::URLRow>* urls);
278 278
279 virtual bool GetVisitsForURL(URLID id, VisitVector* visits); 279 virtual bool GetVisitsForURL(URLID id, VisitVector* visits);
280 280
281 virtual bool UpdateURL(URLID id, const history::URLRow& url); 281 virtual bool UpdateURL(URLID id, const history::URLRow& url);
282 282
283 // While adding visits in batch, the source needs to be provided. 283 // While adding visits in batch, the source needs to be provided.
284 virtual bool AddVisits(const GURL& url, 284 virtual bool AddVisits(const GURL& url,
285 const std::vector<base::Time>& visits, 285 const std::vector<std::pair<
sky 2011/06/09 20:49:01 How about some typedefs for these in history_types
Andrew T Wilson (Slow) 2011/06/09 22:11:36 Added VisitInfo.
286 base::Time, PageTransition::Type> >& visits,
286 VisitSource visit_source); 287 VisitSource visit_source);
287 288
288 virtual bool RemoveVisits(const VisitVector& visits); 289 virtual bool RemoveVisits(const VisitVector& visits);
289 290
290 virtual bool GetURL(const GURL& url, history::URLRow* url_row); 291 virtual bool GetURL(const GURL& url, history::URLRow* url_row);
291 292
292 // Deleting ------------------------------------------------------------------ 293 // Deleting ------------------------------------------------------------------
293 294
294 virtual void DeleteURLs(const std::vector<GURL>& urls); 295 virtual void DeleteURLs(const std::vector<GURL>& urls);
295 296
(...skipping 12 matching lines...) Expand all
308 void URLsNoLongerBookmarked(const std::set<GURL>& urls); 309 void URLsNoLongerBookmarked(const std::set<GURL>& urls);
309 310
310 // Testing ------------------------------------------------------------------- 311 // Testing -------------------------------------------------------------------
311 312
312 // Sets the task to run and the message loop to run it on when this object 313 // Sets the task to run and the message loop to run it on when this object
313 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more 314 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more
314 // complete description. 315 // complete description.
315 void SetOnBackendDestroyTask(MessageLoop* message_loop, Task* task); 316 void SetOnBackendDestroyTask(MessageLoop* message_loop, Task* task);
316 317
317 // Adds the given rows to the database if it doesn't exist. A visit will be 318 // Adds the given rows to the database if it doesn't exist. A visit will be
318 // added for each given URL at the last visit time in the URLRow. 319 // added for each given URL at the last visit time in the URLRow if the
320 // passed visit type != SOURCE_SYNCED (the sync code manages visits itself).
319 // Each visit will have the visit_source type set. 321 // Each visit will have the visit_source type set.
320 void AddPagesWithDetails(const std::vector<URLRow>& info, 322 void AddPagesWithDetails(const std::vector<URLRow>& info,
321 VisitSource visit_source); 323 VisitSource visit_source);
322 324
323 #if defined(UNIT_TEST) 325 #if defined(UNIT_TEST)
324 HistoryDatabase* db() const { return db_.get(); } 326 HistoryDatabase* db() const { return db_.get(); }
325 327
326 ExpireHistoryBackend* expire_backend() { return &expirer_; } 328 ExpireHistoryBackend* expire_backend() { return &expirer_; }
327 #endif 329 #endif
328 330
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // Publishes the history to all indexers which are registered to receive 603 // Publishes the history to all indexers which are registered to receive
602 // history data from us. Can be NULL if there are no listeners. 604 // history data from us. Can be NULL if there are no listeners.
603 scoped_ptr<HistoryPublisher> history_publisher_; 605 scoped_ptr<HistoryPublisher> history_publisher_;
604 606
605 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 607 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
606 }; 608 };
607 609
608 } // namespace history 610 } // namespace history
609 611
610 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 612 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698