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

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

Issue 10014007: Change 9789001: attempt #3 after fixing the problems with linux Created by Wei Li: https://chromium… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/history/history.cc ('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) 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_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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // See NotifyRenderProcessHostDestruction. 130 // See NotifyRenderProcessHostDestruction.
131 void NotifyRenderProcessHostDestruction(const void* host); 131 void NotifyRenderProcessHostDestruction(const void* host);
132 132
133 // Navigation ---------------------------------------------------------------- 133 // Navigation ----------------------------------------------------------------
134 134
135 void AddPage(scoped_refptr<HistoryAddPageArgs> request); 135 void AddPage(scoped_refptr<HistoryAddPageArgs> request);
136 virtual void SetPageTitle(const GURL& url, const string16& title); 136 virtual void SetPageTitle(const GURL& url, const string16& title);
137 void AddPageNoVisitForBookmark(const GURL& url); 137 void AddPageNoVisitForBookmark(const GURL& url);
138 138
139 // Updates the database backend with a page's ending time stamp information.
140 // The page can be identified by the combination of the pointer to
141 // a RenderProcessHost, the page id and the url.
142 //
143 // The given pointer will not be dereferenced, it is only used for
144 // identification purposes, hence it is a void*.
145 void UpdateWithPageEndTime(const void* host,
146 int32 page_id,
147 const GURL& url,
148 base::Time end_ts);
149
150
139 // Indexing ------------------------------------------------------------------ 151 // Indexing ------------------------------------------------------------------
140 152
141 void SetPageContents(const GURL& url, const string16& contents); 153 void SetPageContents(const GURL& url, const string16& contents);
142 154
143 // Querying ------------------------------------------------------------------ 155 // Querying ------------------------------------------------------------------
144 156
145 // ScheduleAutocomplete() never frees |provider| (which is globally live). 157 // ScheduleAutocomplete() never frees |provider| (which is globally live).
146 // It passes |params| on to the autocomplete system which will eventually 158 // It passes |params| on to the autocomplete system which will eventually
147 // free it. 159 // free it.
148 void ScheduleAutocomplete(HistoryURLProvider* provider, 160 void ScheduleAutocomplete(HistoryURLProvider* provider,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource); 398 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource);
387 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsTransitions); 399 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsTransitions);
388 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource); 400 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource);
389 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationIconMapping); 401 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationIconMapping);
390 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconMapping); 402 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconMapping);
391 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddOrUpdateIconMapping); 403 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddOrUpdateIconMapping);
392 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetMostRecentVisits); 404 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetMostRecentVisits);
393 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconForURL); 405 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconForURL);
394 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, 406 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
395 CloneFaviconIsRestrictedToSameDomain); 407 CloneFaviconIsRestrictedToSameDomain);
396 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, 408 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, QueryFilteredURLs);
397 QueryFilteredURLs); 409 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateVisitDuration);
398 410
399 friend class ::TestingProfile; 411 friend class ::TestingProfile;
400 412
401 // Computes the name of the specified database on disk. 413 // Computes the name of the specified database on disk.
402 FilePath GetThumbnailFileName() const; 414 FilePath GetThumbnailFileName() const;
403 415
404 // Returns the name of the Favicons database. This is the new name 416 // Returns the name of the Favicons database. This is the new name
405 // of the Thumbnails database. 417 // of the Thumbnails database.
406 // See ThumbnailDatabase::RenameAndDropThumbnails. 418 // See ThumbnailDatabase::RenameAndDropThumbnails.
407 FilePath GetFaviconsFileName() const; 419 FilePath GetFaviconsFileName() const;
(...skipping 22 matching lines...) Expand all
430 // |cur_visit|. |cur_visit| is assumed to be valid. Assumes that 442 // |cur_visit|. |cur_visit| is assumed to be valid. Assumes that
431 // this HistoryBackend object has been Init()ed successfully. 443 // this HistoryBackend object has been Init()ed successfully.
432 void GetRedirectsFromSpecificVisit( 444 void GetRedirectsFromSpecificVisit(
433 VisitID cur_visit, history::RedirectList* redirects); 445 VisitID cur_visit, history::RedirectList* redirects);
434 446
435 // Similar to the above function except returns a redirect list ending 447 // Similar to the above function except returns a redirect list ending
436 // at |cur_visit|. 448 // at |cur_visit|.
437 void GetRedirectsToSpecificVisit( 449 void GetRedirectsToSpecificVisit(
438 VisitID cur_visit, history::RedirectList* redirects); 450 VisitID cur_visit, history::RedirectList* redirects);
439 451
452 // Update the visit_duration information in visits table.
453 void UpdateVisitDuration(VisitID visit_id, const base::Time end_ts);
454
440 // Thumbnail Helpers --------------------------------------------------------- 455 // Thumbnail Helpers ---------------------------------------------------------
441 456
442 // When a simple GetMostRecentRedirectsFrom() fails, this method is 457 // When a simple GetMostRecentRedirectsFrom() fails, this method is
443 // called which searches the last N visit sessions instead of just 458 // called which searches the last N visit sessions instead of just
444 // the current one. Returns true and puts thumbnail data in |data| 459 // the current one. Returns true and puts thumbnail data in |data|
445 // if a proper thumbnail was found. Returns false otherwise. Assumes 460 // if a proper thumbnail was found. Returns false otherwise. Assumes
446 // that this HistoryBackend object has been Init()ed successfully. 461 // that this HistoryBackend object has been Init()ed successfully.
447 bool GetThumbnailFromOlderRedirect( 462 bool GetThumbnailFromOlderRedirect(
448 const GURL& page_url, std::vector<unsigned char>* data); 463 const GURL& page_url, std::vector<unsigned char>* data);
449 464
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 // Publishes the history to all indexers which are registered to receive 678 // Publishes the history to all indexers which are registered to receive
664 // history data from us. Can be NULL if there are no listeners. 679 // history data from us. Can be NULL if there are no listeners.
665 scoped_ptr<HistoryPublisher> history_publisher_; 680 scoped_ptr<HistoryPublisher> history_publisher_;
666 681
667 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 682 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
668 }; 683 };
669 684
670 } // namespace history 685 } // namespace history
671 686
672 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 687 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698