Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 void Closing(); | 128 void Closing(); |
| 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 void UpdatePageInfo(const void* host, | |
|
GeorgeY
2012/03/22 00:36:49
The same problem with comments and const void*
The
Wei Li
2012/03/22 20:05:38
Done.
| |
| 139 int32 page_id, | |
| 140 const GURL& url, | |
| 141 const base::Time end_ts); | |
| 142 | |
| 138 | 143 |
| 139 // Indexing ------------------------------------------------------------------ | 144 // Indexing ------------------------------------------------------------------ |
| 140 | 145 |
| 141 void SetPageContents(const GURL& url, const string16& contents); | 146 void SetPageContents(const GURL& url, const string16& contents); |
| 142 | 147 |
| 143 // Querying ------------------------------------------------------------------ | 148 // Querying ------------------------------------------------------------------ |
| 144 | 149 |
| 145 // ScheduleAutocomplete() never frees |provider| (which is globally live). | 150 // ScheduleAutocomplete() never frees |provider| (which is globally live). |
| 146 // It passes |params| on to the autocomplete system which will eventually | 151 // It passes |params| on to the autocomplete system which will eventually |
| 147 // free it. | 152 // free it. |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 384 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource); | 389 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource); |
| 385 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsTransitions); | 390 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsTransitions); |
| 386 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource); | 391 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource); |
| 387 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationIconMapping); | 392 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationIconMapping); |
| 388 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconMapping); | 393 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconMapping); |
| 389 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddOrUpdateIconMapping); | 394 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddOrUpdateIconMapping); |
| 390 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetMostRecentVisits); | 395 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetMostRecentVisits); |
| 391 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconForURL); | 396 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconForURL); |
| 392 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 397 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 393 CloneFaviconIsRestrictedToSameDomain); | 398 CloneFaviconIsRestrictedToSameDomain); |
| 394 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 399 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, QueryFilteredURLs); |
| 395 QueryFilteredURLs); | 400 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateVisitDetails); |
| 396 | 401 |
| 397 friend class ::TestingProfile; | 402 friend class ::TestingProfile; |
| 398 | 403 |
| 399 // Computes the name of the specified database on disk. | 404 // Computes the name of the specified database on disk. |
| 400 FilePath GetThumbnailFileName() const; | 405 FilePath GetThumbnailFileName() const; |
| 401 | 406 |
| 402 // Returns the name of the Favicons database. This is the new name | 407 // Returns the name of the Favicons database. This is the new name |
| 403 // of the Thumbnails database. | 408 // of the Thumbnails database. |
| 404 // See ThumbnailDatabase::RenameAndDropThumbnails. | 409 // See ThumbnailDatabase::RenameAndDropThumbnails. |
| 405 FilePath GetFaviconsFileName() const; | 410 FilePath GetFaviconsFileName() const; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 428 // |cur_visit|. |cur_visit| is assumed to be valid. Assumes that | 433 // |cur_visit|. |cur_visit| is assumed to be valid. Assumes that |
| 429 // this HistoryBackend object has been Init()ed successfully. | 434 // this HistoryBackend object has been Init()ed successfully. |
| 430 void GetRedirectsFromSpecificVisit( | 435 void GetRedirectsFromSpecificVisit( |
| 431 VisitID cur_visit, history::RedirectList* redirects); | 436 VisitID cur_visit, history::RedirectList* redirects); |
| 432 | 437 |
| 433 // Similar to the above function except returns a redirect list ending | 438 // Similar to the above function except returns a redirect list ending |
| 434 // at |cur_visit|. | 439 // at |cur_visit|. |
| 435 void GetRedirectsToSpecificVisit( | 440 void GetRedirectsToSpecificVisit( |
| 436 VisitID cur_visit, history::RedirectList* redirects); | 441 VisitID cur_visit, history::RedirectList* redirects); |
| 437 | 442 |
| 443 // Update the visit details information. | |
| 444 void UpdateVisitDetails(VisitID visit_id, const base::Time end_ts); | |
| 445 | |
| 438 // Thumbnail Helpers --------------------------------------------------------- | 446 // Thumbnail Helpers --------------------------------------------------------- |
| 439 | 447 |
| 440 // When a simple GetMostRecentRedirectsFrom() fails, this method is | 448 // When a simple GetMostRecentRedirectsFrom() fails, this method is |
| 441 // called which searches the last N visit sessions instead of just | 449 // called which searches the last N visit sessions instead of just |
| 442 // the current one. Returns true and puts thumbnail data in |data| | 450 // the current one. Returns true and puts thumbnail data in |data| |
| 443 // if a proper thumbnail was found. Returns false otherwise. Assumes | 451 // if a proper thumbnail was found. Returns false otherwise. Assumes |
| 444 // that this HistoryBackend object has been Init()ed successfully. | 452 // that this HistoryBackend object has been Init()ed successfully. |
| 445 bool GetThumbnailFromOlderRedirect( | 453 bool GetThumbnailFromOlderRedirect( |
| 446 const GURL& page_url, std::vector<unsigned char>* data); | 454 const GURL& page_url, std::vector<unsigned char>* data); |
| 447 | 455 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 657 // Publishes the history to all indexers which are registered to receive | 665 // Publishes the history to all indexers which are registered to receive |
| 658 // history data from us. Can be NULL if there are no listeners. | 666 // history data from us. Can be NULL if there are no listeners. |
| 659 scoped_ptr<HistoryPublisher> history_publisher_; | 667 scoped_ptr<HistoryPublisher> history_publisher_; |
| 660 | 668 |
| 661 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 669 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 662 }; | 670 }; |
| 663 | 671 |
| 664 } // namespace history | 672 } // namespace history |
| 665 | 673 |
| 666 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 674 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |