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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // there may be no in-memory database. 68 // there may be no in-memory database.
69 // 69 //
70 // Ownership of the backend pointer is transferred to this function. 70 // Ownership of the backend pointer is transferred to this function.
71 virtual void SetInMemoryBackend(InMemoryHistoryBackend* backend) = 0; 71 virtual void SetInMemoryBackend(InMemoryHistoryBackend* backend) = 0;
72 72
73 // Broadcasts the specified notification to the notification service. 73 // Broadcasts the specified notification to the notification service.
74 // This is implemented here because notifications must only be sent from 74 // This is implemented here because notifications must only be sent from
75 // the main thread. 75 // the main thread.
76 // 76 //
77 // Ownership of the HistoryDetails is transferred to this function. 77 // Ownership of the HistoryDetails is transferred to this function.
78 virtual void BroadcastNotifications(NotificationType type, 78 virtual void BroadcastNotifications(int type,
79 HistoryDetails* details) = 0; 79 HistoryDetails* details) = 0;
80 80
81 // Invoked when the backend has finished loading the db. 81 // Invoked when the backend has finished loading the db.
82 virtual void DBLoaded() = 0; 82 virtual void DBLoaded() = 0;
83 83
84 // Tell TopSites to start reading thumbnails from the ThumbnailsDB. 84 // Tell TopSites to start reading thumbnails from the ThumbnailsDB.
85 virtual void StartTopSitesMigration() = 0; 85 virtual void StartTopSitesMigration() = 0;
86 }; 86 };
87 87
88 // Init must be called to complete object creation. This object can be 88 // Init must be called to complete object creation. This object can be
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Processes the next scheduled HistoryDBTask, scheduling this method 480 // Processes the next scheduled HistoryDBTask, scheduling this method
481 // to be invoked again if there are more tasks that need to run. 481 // to be invoked again if there are more tasks that need to run.
482 void ProcessDBTaskImpl(); 482 void ProcessDBTaskImpl();
483 483
484 // Release all tasks in history_db_tasks_ and clears it. 484 // Release all tasks in history_db_tasks_ and clears it.
485 void ReleaseDBTasks(); 485 void ReleaseDBTasks();
486 486
487 // Schedules a broadcast of the given notification on the main thread. The 487 // Schedules a broadcast of the given notification on the main thread. The
488 // details argument will have ownership taken by this function (it will be 488 // details argument will have ownership taken by this function (it will be
489 // sent to the main thread and deleted there). 489 // sent to the main thread and deleted there).
490 virtual void BroadcastNotifications(NotificationType type, 490 virtual void BroadcastNotifications(int type,
491 HistoryDetails* details_deleted); 491 HistoryDetails* details_deleted);
492 492
493 // Deleting all history ------------------------------------------------------ 493 // Deleting all history ------------------------------------------------------
494 494
495 // Deletes all history. This is a special case of deleting that is separated 495 // Deletes all history. This is a special case of deleting that is separated
496 // from our normal dependency-following method for performance reasons. The 496 // from our normal dependency-following method for performance reasons. The
497 // logic lives here instead of ExpireHistoryBackend since it will cause 497 // logic lives here instead of ExpireHistoryBackend since it will cause
498 // re-initialization of some databases such as Thumbnails or Archived that 498 // re-initialization of some databases such as Thumbnails or Archived that
499 // could fail. When these databases are not valid, our pointers must be NULL, 499 // could fail. When these databases are not valid, our pointers must be NULL,
500 // so we need to handle this type of operation to keep the pointers in sync. 500 // so we need to handle this type of operation to keep the pointers in sync.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 // Publishes the history to all indexers which are registered to receive 603 // Publishes the history to all indexers which are registered to receive
604 // history data from us. Can be NULL if there are no listeners. 604 // history data from us. Can be NULL if there are no listeners.
605 scoped_ptr<HistoryPublisher> history_publisher_; 605 scoped_ptr<HistoryPublisher> history_publisher_;
606 606
607 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 607 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
608 }; 608 };
609 609
610 } // namespace history 610 } // namespace history
611 611
612 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 612 #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