| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 // Processes the next scheduled HistoryDBTask, scheduling this method | 446 // Processes the next scheduled HistoryDBTask, scheduling this method |
| 447 // to be invoked again if there are more tasks that need to run. | 447 // to be invoked again if there are more tasks that need to run. |
| 448 void ProcessDBTaskImpl(); | 448 void ProcessDBTaskImpl(); |
| 449 | 449 |
| 450 // Release all tasks in history_db_tasks_ and clears it. | 450 // Release all tasks in history_db_tasks_ and clears it. |
| 451 void ReleaseDBTasks(); | 451 void ReleaseDBTasks(); |
| 452 | 452 |
| 453 // Schedules a broadcast of the given notification on the main thread. The | 453 // Schedules a broadcast of the given notification on the main thread. The |
| 454 // details argument will have ownership taken by this function (it will be | 454 // details argument will have ownership taken by this function (it will be |
| 455 // sent to the main thread and deleted there). | 455 // sent to the main thread and deleted there). |
| 456 void BroadcastNotifications(NotificationType type, | 456 virtual void BroadcastNotifications(NotificationType type, |
| 457 HistoryDetails* details_deleted); | 457 HistoryDetails* details_deleted); |
| 458 | 458 |
| 459 // Deleting all history ------------------------------------------------------ | 459 // Deleting all history ------------------------------------------------------ |
| 460 | 460 |
| 461 // Deletes all history. This is a special case of deleting that is separated | 461 // Deletes all history. This is a special case of deleting that is separated |
| 462 // from our normal dependency-following method for performance reasons. The | 462 // from our normal dependency-following method for performance reasons. The |
| 463 // logic lives here instead of ExpireHistoryBackend since it will cause | 463 // logic lives here instead of ExpireHistoryBackend since it will cause |
| 464 // re-initialization of some databases such as Thumbnails or Archived that | 464 // re-initialization of some databases such as Thumbnails or Archived that |
| 465 // could fail. When these databases are not valid, our pointers must be NULL, | 465 // could fail. When these databases are not valid, our pointers must be NULL, |
| 466 // so we need to handle this type of operation to keep the pointers in sync. | 466 // so we need to handle this type of operation to keep the pointers in sync. |
| 467 void DeleteAllHistory(); | 467 void DeleteAllHistory(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 // Publishes the history to all indexers which are registered to receive | 569 // Publishes the history to all indexers which are registered to receive |
| 570 // history data from us. Can be NULL if there are no listeners. | 570 // history data from us. Can be NULL if there are no listeners. |
| 571 scoped_ptr<HistoryPublisher> history_publisher_; | 571 scoped_ptr<HistoryPublisher> history_publisher_; |
| 572 | 572 |
| 573 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 573 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 574 }; | 574 }; |
| 575 | 575 |
| 576 } // namespace history | 576 } // namespace history |
| 577 | 577 |
| 578 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 578 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |