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

Side by Side Diff: components/webdata/common/web_database_service.h

Issue 2225333003: Recreate the WebData database on a catastrophic SQL error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Chromium settings and storage represent user-selected preferences and 5 // Chromium settings and storage represent user-selected preferences and
6 // information and MUST not be extracted, overwritten or modified except 6 // information and MUST not be extracted, overwritten or modified except
7 // through Chromium defined APIs. 7 // through Chromium defined APIs.
8 8
9 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ 9 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_
10 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ 10 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void RegisterDBErrorCallback(const DBLoadErrorCallback& callback); 113 void RegisterDBErrorCallback(const DBLoadErrorCallback& callback);
114 114
115 bool db_loaded() const { return db_loaded_; }; 115 bool db_loaded() const { return db_loaded_; };
116 116
117 private: 117 private:
118 class BackendDelegate; 118 class BackendDelegate;
119 friend class BackendDelegate; 119 friend class BackendDelegate;
120 friend class base::RefCountedDeleteOnMessageLoop<WebDatabaseService>; 120 friend class base::RefCountedDeleteOnMessageLoop<WebDatabaseService>;
121 friend class base::DeleteHelper<WebDatabaseService>; 121 friend class base::DeleteHelper<WebDatabaseService>;
122 122
123 typedef std::vector<DBLoadedCallback> LoadedCallbacks; 123 using LoadedCallbacks = std::vector<DBLoadedCallback>;
124 typedef std::vector<DBLoadErrorCallback> ErrorCallbacks; 124 using ErrorCallbacks = std::vector<DBLoadErrorCallback>;
125 125
126 virtual ~WebDatabaseService(); 126 virtual ~WebDatabaseService();
127 127
128 void OnDatabaseLoadDone(sql::InitStatus status, 128 void OnDatabaseLoadDone(sql::InitStatus status,
129 const std::string& diagnostics); 129 const std::string& diagnostics);
130 130
131 base::FilePath path_; 131 base::FilePath path_;
132 132
133 // The primary owner is |WebDatabaseService| but is refcounted because 133 // The primary owner is |WebDatabaseService| but is refcounted because
134 // PostTask on DB thread may outlive us. 134 // PostTask on DB thread may outlive us.
(...skipping 10 matching lines...) Expand all
145 145
146 scoped_refptr<base::SingleThreadTaskRunner> db_thread_; 146 scoped_refptr<base::SingleThreadTaskRunner> db_thread_;
147 147
148 // All vended weak pointers are invalidated in ShutdownDatabase(). 148 // All vended weak pointers are invalidated in ShutdownDatabase().
149 base::WeakPtrFactory<WebDatabaseService> weak_ptr_factory_; 149 base::WeakPtrFactory<WebDatabaseService> weak_ptr_factory_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(WebDatabaseService); 151 DISALLOW_COPY_AND_ASSIGN(WebDatabaseService);
152 }; 152 };
153 153
154 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ 154 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_
OLDNEW
« no previous file with comments | « components/webdata/common/web_database_backend.cc ('k') | components/webdata/common/web_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698