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

Unified Diff: chrome/browser/autocomplete/history_quick_provider.cc

Issue 1133533003: Omnibox - Log Addition Crash Data for Rare HQP Crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use fixed_keys array Created 5 years, 7 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 | « no previous file | chrome/common/crash_keys.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_quick_provider.cc
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 68cd805af91c950a9f5f13a6dfd9cf22509c1c02..57c86ae941be2873682a6e59bd1dba06fb1e9cfc 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
+#include "base/debug/crash_logging.h"
#include "base/i18n/break_iterator.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
@@ -26,6 +27,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/crash_keys.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/bookmarks/browser/bookmark_model.h"
@@ -258,7 +260,13 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
// Set |inline_autocompletion| and |allowed_to_be_default_match| if possible.
if (history_match.can_inline) {
- DCHECK(!new_matches.empty());
+ base::debug::ScopedCrashKey crash_info(
+ crash_keys::kBug464926CrashKey,
+ info.url().spec().substr(0, 30) + " " +
+ base::UTF16ToUTF8(autocomplete_input_.text()).substr(0, 20) + " " +
+ base::SizeTToString(history_match.url_matches.size()) + " " +
+ base::SizeTToString(offsets.size()));;
+ CHECK(!new_matches.empty());
size_t inline_autocomplete_offset = new_matches[0].offset +
new_matches[0].length;
// |inline_autocomplete_offset| may be beyond the end of the
« no previous file with comments | « no previous file | chrome/common/crash_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698