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

Unified Diff: components/password_manager/core/browser/login_database.cc

Issue 807263003: Instrumenting opening password database to find jank (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/login_database.cc
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
index ef739c3b74169c539761387af47218c2930a1421..a9d329f3d63f36b1bbc97022500f1b0882adf7c1 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/pickle.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
@@ -156,9 +157,15 @@ bool LoginDatabase::Init(const base::FilePath& db_path) {
db_.set_exclusive_locking();
db_.set_restrict_to_user();
- if (!db_.Open(db_path)) {
- LOG(WARNING) << "Unable to open the password store database.";
- return false;
+ {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/138903 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("138903 LoginDatabase::Init db init"));
+
+ if (!db_.Open(db_path)) {
+ LOG(WARNING) << "Unable to open the password store database.";
+ return false;
+ }
}
sql::Transaction transaction(&db_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698