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_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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // Only a single type can be given in icon_type when page_url is specified. | 450 // Only a single type can be given in icon_type when page_url is specified. |
451 void UpdateFavIconMappingAndFetchImpl( | 451 void UpdateFavIconMappingAndFetchImpl( |
452 const GURL* page_url, | 452 const GURL* page_url, |
453 const GURL& icon_url, | 453 const GURL& icon_url, |
454 scoped_refptr<GetFavIconRequest> request, | 454 scoped_refptr<GetFavIconRequest> request, |
455 int icon_type); | 455 int icon_type); |
456 | 456 |
457 // Sets the favicon url id for page_url to id. This will also broadcast | 457 // Sets the favicon url id for page_url to id. This will also broadcast |
458 // notifications as necessary. | 458 // notifications as necessary. |
459 void SetFaviconMapping(const GURL& page_url, | 459 void SetFaviconMapping(const GURL& page_url, |
460 FavIconID id, | 460 FaviconID id, |
461 IconType icon_type); | 461 IconType icon_type); |
462 | 462 |
463 // Updates the FavIconID associated with the url of a page. If there is an | 463 // Updates the FaviconID associated with the url of a page. If there is an |
464 // existing mapping between |page_url| and |id| this does nothing and returns | 464 // existing mapping between |page_url| and |id| this does nothing and returns |
465 // false. If the mapping needs to be added or updated, true is returned. If | 465 // false. If the mapping needs to be added or updated, true is returned. If |
466 // there is an existing mapping but it does not map to |id|, then the |id| of | 466 // there is an existing mapping but it does not map to |id|, then the |id| of |
467 // the replaced FavIconID is set in |replaced_icon_id|. | 467 // the replaced FaviconID is set in |replaced_icon_id|. |
468 bool AddOrUpdateIconMapping(const GURL& page_url, | 468 bool AddOrUpdateIconMapping(const GURL& page_url, |
469 FavIconID id, | 469 FaviconID id, |
470 IconType icon_type, | 470 IconType icon_type, |
471 FavIconID* replaced_icon_id); | 471 FaviconID* replaced_icon_id); |
472 | 472 |
473 // Generic stuff ------------------------------------------------------------- | 473 // Generic stuff ------------------------------------------------------------- |
474 | 474 |
475 // Processes the next scheduled HistoryDBTask, scheduling this method | 475 // Processes the next scheduled HistoryDBTask, scheduling this method |
476 // to be invoked again if there are more tasks that need to run. | 476 // to be invoked again if there are more tasks that need to run. |
477 void ProcessDBTaskImpl(); | 477 void ProcessDBTaskImpl(); |
478 | 478 |
479 // Release all tasks in history_db_tasks_ and clears it. | 479 // Release all tasks in history_db_tasks_ and clears it. |
480 void ReleaseDBTasks(); | 480 void ReleaseDBTasks(); |
481 | 481 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 // Publishes the history to all indexers which are registered to receive | 598 // Publishes the history to all indexers which are registered to receive |
599 // history data from us. Can be NULL if there are no listeners. | 599 // history data from us. Can be NULL if there are no listeners. |
600 scoped_ptr<HistoryPublisher> history_publisher_; | 600 scoped_ptr<HistoryPublisher> history_publisher_; |
601 | 601 |
602 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 602 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
603 }; | 603 }; |
604 | 604 |
605 } // namespace history | 605 } // namespace history |
606 | 606 |
607 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 607 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |