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

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

Issue 1805363002: Add traces for main omnibox providers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TBR=oysteine@chromium.org Created 4 years, 9 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 | « base/trace_event/trace_log.cc ('k') | components/omnibox/browser/bookmark_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/autocomplete_controller.cc
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
index df7990d9d3a932a1a58398f4c651963aad3c98f7..19be64e4f028381da1db02273df89b7138cb1dbd 100644
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -14,7 +14,9 @@
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/omnibox/browser/autocomplete_controller_delegate.h"
#include "components/omnibox/browser/bookmark_provider.h"
@@ -231,6 +233,8 @@ AutocompleteController::~AutocompleteController() {
}
void AutocompleteController::Start(const AutocompleteInput& input) {
+ TRACE_EVENT1("omnibox", "AutocompleteController::Start",
+ "text", base::UTF16ToUTF8(input.text()));
const base::string16 old_input_text(input_.text());
const bool old_want_asynchronous_matches = input_.want_asynchronous_matches();
const bool old_from_omnibox_focus = input_.from_omnibox_focus();
@@ -395,6 +399,7 @@ void AutocompleteController::UpdateMatchDestinationURL(
void AutocompleteController::UpdateResult(
bool regenerate_result,
bool force_notify_default_match_changed) {
+ TRACE_EVENT0("omnibox", "AutocompleteController::UpdateResult");
const bool last_default_was_valid = result_.default_match() != result_.end();
// The following three variables are only set and used if
// |last_default_was_valid|.
« no previous file with comments | « base/trace_event/trace_log.cc ('k') | components/omnibox/browser/bookmark_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698