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

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

Issue 510033004: Minor history tweaks that I came across while looking at crashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/history/history_service.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class VisitedLinkMaster; 55 class VisitedLinkMaster;
56 } 56 }
57 57
58 namespace history { 58 namespace history {
59 59
60 class HistoryBackend; 60 class HistoryBackend;
61 class HistoryClient; 61 class HistoryClient;
62 class HistoryDatabase; 62 class HistoryDatabase;
63 class HistoryDBTask; 63 class HistoryDBTask;
64 class HistoryQueryTest; 64 class HistoryQueryTest;
65 class HistoryTest;
65 class InMemoryHistoryBackend; 66 class InMemoryHistoryBackend;
66 class InMemoryURLIndex; 67 class InMemoryURLIndex;
67 class InMemoryURLIndexTest; 68 class InMemoryURLIndexTest;
68 class URLDatabase; 69 class URLDatabase;
69 class VisitDatabaseObserver; 70 class VisitDatabaseObserver;
70 class VisitFilter; 71 class VisitFilter;
71 struct DownloadRow; 72 struct DownloadRow;
72 struct HistoryAddPageArgs; 73 struct HistoryAddPageArgs;
73 struct HistoryDetails; 74 struct HistoryDetails;
74 struct KeywordSearchTermVisit; 75 struct KeywordSearchTermVisit;
(...skipping 29 matching lines...) Expand all
104 } 105 }
105 106
106 // Triggers the backend to load if it hasn't already, and then returns whether 107 // Triggers the backend to load if it hasn't already, and then returns whether
107 // it's finished loading. 108 // it's finished loading.
108 // Note: Virtual needed for mocking. 109 // Note: Virtual needed for mocking.
109 virtual bool BackendLoaded(); 110 virtual bool BackendLoaded();
110 111
111 // Returns true if the backend has finished loading. 112 // Returns true if the backend has finished loading.
112 bool backend_loaded() const { return backend_loaded_; } 113 bool backend_loaded() const { return backend_loaded_; }
113 114
114 // Called on shutdown, this will tell the history backend to complete and
115 // will release pointers to it. No other functions should be called once
116 // cleanup has happened that may dispatch to the history thread (because it
117 // will be NULL).
118 //
119 // In practice, this will be called by the service manager (BrowserProcess)
120 // when it is being destroyed. Because that reference is being destroyed, it
121 // should be impossible for anybody else to call the service, even if it is
122 // still in memory (pending requests may be holding a reference to us).
123 void Cleanup();
124
125 // Context ids are used to scope page IDs (see AddPage). These contexts 115 // Context ids are used to scope page IDs (see AddPage). These contexts
126 // must tell us when they are being invalidated so that we can clear 116 // must tell us when they are being invalidated so that we can clear
127 // out any cached data associated with that context. 117 // out any cached data associated with that context.
128 void ClearCachedDataForContextID(history::ContextID context_id); 118 void ClearCachedDataForContextID(history::ContextID context_id);
129 119
130 // Triggers the backend to load if it hasn't already, and then returns the 120 // Triggers the backend to load if it hasn't already, and then returns the
131 // in-memory URL database. The returned pointer MAY BE NULL if the in-memory 121 // in-memory URL database. The returned pointer MAY BE NULL if the in-memory
132 // database has not been loaded yet. This pointer is owned by the history 122 // database has not been loaded yet. This pointer is owned by the history
133 // system. Callers should not store or cache this value. 123 // system. Callers should not store or cache this value.
134 // 124 //
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 #if defined(OS_ANDROID) 516 #if defined(OS_ANDROID)
527 friend class AndroidHistoryProviderService; 517 friend class AndroidHistoryProviderService;
528 #endif 518 #endif
529 friend class base::RefCountedThreadSafe<HistoryService>; 519 friend class base::RefCountedThreadSafe<HistoryService>;
530 friend class BackendDelegate; 520 friend class BackendDelegate;
531 friend class FaviconService; 521 friend class FaviconService;
532 friend class history::HistoryBackend; 522 friend class history::HistoryBackend;
533 friend class history::HistoryQueryTest; 523 friend class history::HistoryQueryTest;
534 friend class HistoryOperation; 524 friend class HistoryOperation;
535 friend class HistoryQuickProviderTest; 525 friend class HistoryQuickProviderTest;
526 friend class history::HistoryTest;
536 friend class HistoryURLProvider; 527 friend class HistoryURLProvider;
537 friend class HistoryURLProviderTest; 528 friend class HistoryURLProviderTest;
538 friend class history::InMemoryURLIndexTest; 529 friend class history::InMemoryURLIndexTest;
539 template<typename Info, typename Callback> friend class DownloadRequest; 530 template<typename Info, typename Callback> friend class DownloadRequest;
540 friend class PageUsageRequest; 531 friend class PageUsageRequest;
541 friend class RedirectRequest; 532 friend class RedirectRequest;
542 friend class TestingProfile; 533 friend class TestingProfile;
543 534
535 // Called on shutdown, this will tell the history backend to complete and
536 // will release pointers to it. No other functions should be called once
537 // cleanup has happened that may dispatch to the history thread (because it
538 // will be NULL).
539 //
540 // In practice, this will be called by the service manager (BrowserProcess)
541 // when it is being destroyed. Because that reference is being destroyed, it
542 // should be impossible for anybody else to call the service, even if it is
543 // still in memory (pending requests may be holding a reference to us).
544 void Cleanup();
545
544 // Implementation of content::NotificationObserver. 546 // Implementation of content::NotificationObserver.
545 virtual void Observe(int type, 547 virtual void Observe(int type,
546 const content::NotificationSource& source, 548 const content::NotificationSource& source,
547 const content::NotificationDetails& details) OVERRIDE; 549 const content::NotificationDetails& details) OVERRIDE;
548 550
549 // Implementation of visitedlink::VisitedLinkDelegate. 551 // Implementation of visitedlink::VisitedLinkDelegate.
550 virtual void RebuildTable( 552 virtual void RebuildTable(
551 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; 553 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE;
552 554
553 // Low-level Init(). Same as the public version, but adds a |no_db| parameter 555 // Low-level Init(). Same as the public version, but adds a |no_db| parameter
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 867 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
866 868
867 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 869 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
868 870
869 history::DeleteDirectiveHandler delete_directive_handler_; 871 history::DeleteDirectiveHandler delete_directive_handler_;
870 872
871 DISALLOW_COPY_AND_ASSIGN(HistoryService); 873 DISALLOW_COPY_AND_ASSIGN(HistoryService);
872 }; 874 };
873 875
874 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 876 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698