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

Side by Side Diff: components/history/core/browser/history_backend.h

Issue 2107493002: Offer user to send feedback from profile error dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unused variable Created 4 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
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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 public: 106 public:
107 // Interface implemented by the owner of the HistoryBackend object. Normally, 107 // Interface implemented by the owner of the HistoryBackend object. Normally,
108 // the history service implements this to send stuff back to the main thread. 108 // the history service implements this to send stuff back to the main thread.
109 // The unit tests can provide a different implementation if they don't have 109 // The unit tests can provide a different implementation if they don't have
110 // a history service object. 110 // a history service object.
111 class Delegate { 111 class Delegate {
112 public: 112 public:
113 virtual ~Delegate() {} 113 virtual ~Delegate() {}
114 114
115 // Called when the database cannot be read correctly for some reason. 115 // Called when the database cannot be read correctly for some reason.
116 virtual void NotifyProfileError(sql::InitStatus init_status) = 0; 116 virtual void NotifyProfileError(const base::FilePath& corrupted_file,
117 sql::InitStatus init_status) = 0;
117 118
118 // Sets the in-memory history backend. The in-memory backend is created by 119 // Sets the in-memory history backend. The in-memory backend is created by
119 // the main backend. For non-unit tests, this happens on the background 120 // the main backend. For non-unit tests, this happens on the background
120 // thread. It is to be used on the main thread, so this would transfer 121 // thread. It is to be used on the main thread, so this would transfer
121 // it to the history service. Unit tests can override this behavior. 122 // it to the history service. Unit tests can override this behavior.
122 // 123 //
123 // This function is NOT guaranteed to be called. If there is an error, 124 // This function is NOT guaranteed to be called. If there is an error,
124 // there may be no in-memory database. 125 // there may be no in-memory database.
125 virtual void SetInMemoryBackend( 126 virtual void SetInMemoryBackend(
126 std::unique_ptr<InMemoryHistoryBackend> backend) = 0; 127 std::unique_ptr<InMemoryHistoryBackend> backend) = 0;
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 886
886 // List of observers 887 // List of observers
887 base::ObserverList<HistoryBackendObserver> observers_; 888 base::ObserverList<HistoryBackendObserver> observers_;
888 889
889 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 890 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
890 }; 891 };
891 892
892 } // namespace history 893 } // namespace history
893 894
894 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ 895 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698