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

Unified Diff: chrome/browser/sql_init_error_message_ids.cc

Issue 2225333003: Recreate the WebData database on a catastrophic SQL error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shess' comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sql_init_error_message_ids.cc
diff --git a/chrome/browser/sql_init_error_message_ids.cc b/chrome/browser/sql_init_error_message_ids.cc
new file mode 100644
index 0000000000000000000000000000000000000000..60c9fe2d778a3881e59ae672ad16204cd6d2750e
--- /dev/null
+++ b/chrome/browser/sql_init_error_message_ids.cc
@@ -0,0 +1,18 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/sql_init_error_message_ids.h"
+
+#include "chrome/grit/chromium_strings.h"
+#include "chrome/grit/generated_resources.h"
+
+int SqlInitStatusToMessageId(sql::InitStatus status) {
+ if (status == sql::INIT_OK_WITH_DATA_LOSS)
+ return IDS_OPEN_PROFILE_DATA_LOSS;
+
+ if (status == sql::INIT_FAILURE)
+ return IDS_COULDNT_OPEN_PROFILE_ERROR;
+
+ return IDS_PROFILE_TOO_NEW_ERROR;
+}

Powered by Google App Engine
This is Rietveld 408576698