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

Side by Side Diff: chrome/browser/history/history.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
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_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 friend class history::HistoryQueryTest; 598 friend class history::HistoryQueryTest;
599 friend class HistoryOperation; 599 friend class HistoryOperation;
600 friend class HistoryURLProvider; 600 friend class HistoryURLProvider;
601 friend class HistoryURLProviderTest; 601 friend class HistoryURLProviderTest;
602 template<typename Info, typename Callback> friend class DownloadRequest; 602 template<typename Info, typename Callback> friend class DownloadRequest;
603 friend class PageUsageRequest; 603 friend class PageUsageRequest;
604 friend class RedirectRequest; 604 friend class RedirectRequest;
605 friend class TestingProfile; 605 friend class TestingProfile;
606 606
607 // Implementation of NotificationObserver. 607 // Implementation of NotificationObserver.
608 virtual void Observe(NotificationType type, 608 virtual void Observe(int type,
609 const NotificationSource& source, 609 const NotificationSource& source,
610 const NotificationDetails& details); 610 const NotificationDetails& details);
611 611
612 // Low-level Init(). Same as the public version, but adds a |no_db| parameter 612 // Low-level Init(). Same as the public version, but adds a |no_db| parameter
613 // that is only set by unittests which causes the backend to not init its DB. 613 // that is only set by unittests which causes the backend to not init its DB.
614 bool Init(const FilePath& history_dir, 614 bool Init(const FilePath& history_dir,
615 BookmarkService* bookmark_service, 615 BookmarkService* bookmark_service,
616 bool no_db); 616 bool no_db);
617 617
618 // Called by the HistoryURLProvider class to schedule an autocomplete, it 618 // Called by the HistoryURLProvider class to schedule an autocomplete, it
619 // will be called back on the internal history thread with the history 619 // will be called back on the internal history thread with the history
620 // database so it can query. See history_autocomplete.cc for a diagram. 620 // database so it can query. See history_autocomplete.cc for a diagram.
621 void ScheduleAutocomplete(HistoryURLProvider* provider, 621 void ScheduleAutocomplete(HistoryURLProvider* provider,
622 HistoryURLProviderParams* params); 622 HistoryURLProviderParams* params);
623 623
624 // Broadcasts the given notification. This is called by the backend so that 624 // Broadcasts the given notification. This is called by the backend so that
625 // the notification will be broadcast on the main thread. 625 // the notification will be broadcast on the main thread.
626 // 626 //
627 // The |details_deleted| pointer will be sent as the "details" for the 627 // The |details_deleted| pointer will be sent as the "details" for the
628 // notification. The function takes ownership of the pointer and deletes it 628 // notification. The function takes ownership of the pointer and deletes it
629 // when the notification is sent (it is coming from another thread, so must 629 // when the notification is sent (it is coming from another thread, so must
630 // be allocated on the heap). 630 // be allocated on the heap).
631 void BroadcastNotifications(NotificationType type, 631 void BroadcastNotifications(int type,
632 history::HistoryDetails* details_deleted); 632 history::HistoryDetails* details_deleted);
633 633
634 // Initializes the backend. 634 // Initializes the backend.
635 void LoadBackendIfNecessary(); 635 void LoadBackendIfNecessary();
636 636
637 // Notification from the backend that it has finished loading. Sends 637 // Notification from the backend that it has finished loading. Sends
638 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true. 638 // notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true.
639 void OnDBLoaded(); 639 void OnDBLoaded();
640 640
641 // Favicon ------------------------------------------------------------------- 641 // Favicon -------------------------------------------------------------------
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 BookmarkService* bookmark_service_; 869 BookmarkService* bookmark_service_;
870 bool no_db_; 870 bool no_db_;
871 871
872 // True if needs top site migration. 872 // True if needs top site migration.
873 bool needs_top_sites_migration_; 873 bool needs_top_sites_migration_;
874 874
875 DISALLOW_COPY_AND_ASSIGN(HistoryService); 875 DISALLOW_COPY_AND_ASSIGN(HistoryService);
876 }; 876 };
877 877
878 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ 878 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend_unittest.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698