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

Unified Diff: chrome/browser/password_manager/password_store_factory.cc

Issue 10824008: Annotate calls to SQLite functions - they have to be executed on a thread allowing IO access. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/sqlite_server_bound_cert_store.cc ('k') | sql/connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_store_factory.cc
===================================================================
--- chrome/browser/password_manager/password_store_factory.cc (revision 147715)
+++ chrome/browser/password_manager/password_store_factory.cc (working copy)
@@ -99,10 +99,15 @@
FilePath login_db_file_path = profile->GetPath();
login_db_file_path = login_db_file_path.Append(chrome::kLoginDataFileName);
LoginDatabase* login_db = new LoginDatabase();
- if (!login_db->Init(login_db_file_path)) {
- LOG(ERROR) << "Could not initialize login database.";
- delete login_db;
- return NULL;
+ {
+ // TODO(paivanof@gmail.com): execution of login_db->Init() should go
+ // to DB thread. http://crbug.com/138903
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ if (!login_db->Init(login_db_file_path)) {
+ LOG(ERROR) << "Could not initialize login database.";
+ delete login_db;
+ return NULL;
+ }
}
#if defined(OS_WIN)
ps = new PasswordStoreWin(
« no previous file with comments | « chrome/browser/net/sqlite_server_bound_cert_store.cc ('k') | sql/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698