| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 void AddPagesWithDetails(const std::vector<history::URLRow>& info); | 547 void AddPagesWithDetails(const std::vector<history::URLRow>& info); |
| 548 | 548 |
| 549 // Starts the TopSites migration in the HistoryThread. Called by the | 549 // Starts the TopSites migration in the HistoryThread. Called by the |
| 550 // BackendDelegate. | 550 // BackendDelegate. |
| 551 void StartTopSitesMigration(); | 551 void StartTopSitesMigration(); |
| 552 | 552 |
| 553 // Called by TopSites after the thumbnails were read and it is safe | 553 // Called by TopSites after the thumbnails were read and it is safe |
| 554 // to delete the thumbnails DB. | 554 // to delete the thumbnails DB. |
| 555 void OnTopSitesReady(); | 555 void OnTopSitesReady(); |
| 556 | 556 |
| 557 // Returns true if this looks like the type of URL we want to add to the |
| 558 // history. We filter out some URLs such as JavaScript. |
| 559 static bool CanAddURL(const GURL& url); |
| 560 |
| 557 protected: | 561 protected: |
| 558 ~HistoryService(); | 562 ~HistoryService(); |
| 559 | 563 |
| 560 // These are not currently used, hopefully we can do something in the future | 564 // These are not currently used, hopefully we can do something in the future |
| 561 // to ensure that the most important things happen first. | 565 // to ensure that the most important things happen first. |
| 562 enum SchedulePriority { | 566 enum SchedulePriority { |
| 563 PRIORITY_UI, // The highest priority (must respond to UI events). | 567 PRIORITY_UI, // The highest priority (must respond to UI events). |
| 564 PRIORITY_NORMAL, // Normal stuff like adding a page. | 568 PRIORITY_NORMAL, // Normal stuff like adding a page. |
| 565 PRIORITY_LOW, // Low priority things like indexing or expiration. | 569 PRIORITY_LOW, // Low priority things like indexing or expiration. |
| 566 }; | 570 }; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 void BroadcastNotifications(NotificationType type, | 612 void BroadcastNotifications(NotificationType type, |
| 609 history::HistoryDetails* details_deleted); | 613 history::HistoryDetails* details_deleted); |
| 610 | 614 |
| 611 // Initializes the backend. | 615 // Initializes the backend. |
| 612 void LoadBackendIfNecessary(); | 616 void LoadBackendIfNecessary(); |
| 613 | 617 |
| 614 // Notification from the backend that it has finished loading. Sends | 618 // Notification from the backend that it has finished loading. Sends |
| 615 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. | 619 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. |
| 616 void OnDBLoaded(); | 620 void OnDBLoaded(); |
| 617 | 621 |
| 618 // Returns true if this looks like the type of URL we want to add to the | |
| 619 // history. We filter out some URLs such as JavaScript. | |
| 620 bool CanAddURL(const GURL& url) const; | |
| 621 | |
| 622 // FavIcon ------------------------------------------------------------------- | 622 // FavIcon ------------------------------------------------------------------- |
| 623 | 623 |
| 624 // These favicon methods are exposed to the FaviconService. Instead of calling | 624 // These favicon methods are exposed to the FaviconService. Instead of calling |
| 625 // these methods directly you should call the respective method on the | 625 // these methods directly you should call the respective method on the |
| 626 // FaviconService. | 626 // FaviconService. |
| 627 | 627 |
| 628 // Used by the FaviconService to get a favicon from the history backend. | 628 // Used by the FaviconService to get a favicon from the history backend. |
| 629 void GetFavicon(FaviconService::GetFaviconRequest* request, | 629 void GetFavicon(FaviconService::GetFaviconRequest* request, |
| 630 const GURL& icon_url); | 630 const GURL& icon_url); |
| 631 | 631 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 | 843 |
| 844 // Cached values from Init(), used whenever we need to reload the backend. | 844 // Cached values from Init(), used whenever we need to reload the backend. |
| 845 FilePath history_dir_; | 845 FilePath history_dir_; |
| 846 BookmarkService* bookmark_service_; | 846 BookmarkService* bookmark_service_; |
| 847 bool no_db_; | 847 bool no_db_; |
| 848 | 848 |
| 849 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 849 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 850 }; | 850 }; |
| 851 | 851 |
| 852 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 852 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
| OLD | NEW |