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

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: Updated per review comments. 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
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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<history::VisitInfo>& visits,
286 VisitSource visit_source); 286 VisitSource visit_source);
287 287
288 virtual bool RemoveVisits(const VisitVector& visits); 288 virtual bool RemoveVisits(const VisitVector& visits);
289 289
290 virtual bool GetURL(const GURL& url, history::URLRow* url_row); 290 virtual bool GetURL(const GURL& url, history::URLRow* url_row);
291 291
292 // Deleting ------------------------------------------------------------------ 292 // Deleting ------------------------------------------------------------------
293 293
294 virtual void DeleteURLs(const std::vector<GURL>& urls); 294 virtual void DeleteURLs(const std::vector<GURL>& urls);
295 295
(...skipping 12 matching lines...) Expand all
308 void URLsNoLongerBookmarked(const std::set<GURL>& urls); 308 void URLsNoLongerBookmarked(const std::set<GURL>& urls);
309 309
310 // Testing ------------------------------------------------------------------- 310 // Testing -------------------------------------------------------------------
311 311
312 // Sets the task to run and the message loop to run it on when this object 312 // 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 313 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more
314 // complete description. 314 // complete description.
315 void SetOnBackendDestroyTask(MessageLoop* message_loop, Task* task); 315 void SetOnBackendDestroyTask(MessageLoop* message_loop, Task* task);
316 316
317 // Adds the given rows to the database if it doesn't exist. A visit will be 317 // 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. 318 // added for each given URL at the last visit time in the URLRow if the
319 // passed visit type != SOURCE_SYNCED (the sync code manages visits itself).
319 // Each visit will have the visit_source type set. 320 // Each visit will have the visit_source type set.
320 void AddPagesWithDetails(const std::vector<URLRow>& info, 321 void AddPagesWithDetails(const std::vector<URLRow>& info,
321 VisitSource visit_source); 322 VisitSource visit_source);
322 323
323 #if defined(UNIT_TEST) 324 #if defined(UNIT_TEST)
324 HistoryDatabase* db() const { return db_.get(); } 325 HistoryDatabase* db() const { return db_.get(); }
325 326
326 ExpireHistoryBackend* expire_backend() { return &expirer_; } 327 ExpireHistoryBackend* expire_backend() { return &expirer_; }
327 #endif 328 #endif
328 329
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // Publishes the history to all indexers which are registered to receive 602 // Publishes the history to all indexers which are registered to receive
602 // history data from us. Can be NULL if there are no listeners. 603 // history data from us. Can be NULL if there are no listeners.
603 scoped_ptr<HistoryPublisher> history_publisher_; 604 scoped_ptr<HistoryPublisher> history_publisher_;
604 605
605 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 606 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
606 }; 607 };
607 608
608 } // namespace history 609 } // namespace history
609 610
610 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 611 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698