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

Unified Diff: components/omnibox/browser/history_quick_provider.cc

Issue 1292983006: Componentize kBug464926CrashKey into crash_keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO(mpearson) to cleanup once bug 464926 is fixed Created 5 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
« no previous file with comments | « components/omnibox/browser/DEPS ('k') | ios/chrome/browser/crash_report/crash_keys.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/history_quick_provider.cc
diff --git a/components/omnibox/browser/history_quick_provider.cc b/components/omnibox/browser/history_quick_provider.cc
index 32ac0e778d941172b2a551b7a8b9197e33311b85..8eb898403377e0455374c82d4f59b2f977feadd6 100644
--- a/components/omnibox/browser/history_quick_provider.cc
+++ b/components/omnibox/browser/history_quick_provider.cc
@@ -16,6 +16,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/bookmarks/browser/bookmark_model.h"
+#include "components/crash_keys/crash_keys.h"
#include "components/history/core/browser/history_database.h"
#include "components/history/core/browser/history_service.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
@@ -34,16 +35,6 @@
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_util.h"
-namespace {
-
-// Used to help investigate bug 464926. NOTE: This value is defined multiple
-// places in the codebase due to layering issues. DO NOT change the value here
-// without changing it in all other places that it is defined in the codebase
-// (search for |kBug464926CrashKey|).
-const char kBug464926CrashKey[] = "bug-464926-info";
-
-} // namespace
-
bool HistoryQuickProvider::disabled_ = false;
HistoryQuickProvider::HistoryQuickProvider(AutocompleteProviderClient* client)
@@ -244,8 +235,12 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
// Set |inline_autocompletion| and |allowed_to_be_default_match| if possible.
if (history_match.can_inline) {
+ // TODO(mpearson): remove this and all dependency of //components/omnibox
+ // on //components/crash_keys once http://crbug.com/464926 is fixed (i.e.
+ // remove #include, exception in components/omnibox/DEPS, and dependency
+ // in components/omnibox.gypi and components/omnibox/browser/BUILD.gn).
base::debug::ScopedCrashKey crash_info(
- kBug464926CrashKey,
+ crash_keys::kBug464926CrashKey,
info.url().spec().substr(0, 30) + " " +
base::UTF16ToUTF8(autocomplete_input_.text()).substr(0, 20) + " " +
base::SizeTToString(history_match.url_matches.size()) + " " +
« no previous file with comments | « components/omnibox/browser/DEPS ('k') | ios/chrome/browser/crash_report/crash_keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698