summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-01 00:09:50 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-01 00:09:50 +0000
commit0fafc8de47e8aa377e3fb96fc914fbe7399fe9c6 (patch)
tree60b20b99b0720b17bfa1b89341f58998d0ca6fbd
parent5864995efd4d711ef4adf3f8fad620c2f40124ec (diff)
downloadchromium_src-0fafc8de47e8aa377e3fb96fc914fbe7399fe9c6.zip
chromium_src-0fafc8de47e8aa377e3fb96fc914fbe7399fe9c6.tar.gz
chromium_src-0fafc8de47e8aa377e3fb96fc914fbe7399fe9c6.tar.bz2
Rename AutocompleteLog to OmniboxLog and move it into c/b/omnibox.
BUG=80186 R=pkasting@chromium.org TBR=thestig@chromium.org Review URL: https://chromiumcodereview.appspot.com/16069003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203525 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/history/DEPS2
-rw-r--r--chrome/browser/history/shortcuts_backend.cc4
-rw-r--r--chrome/browser/metrics/metrics_log.cc4
-rw-r--r--chrome/browser/metrics/metrics_log.h4
-rw-r--r--chrome/browser/metrics/metrics_service.cc6
-rw-r--r--chrome/browser/omnibox/omnibox_log.cc (renamed from chrome/browser/autocomplete/autocomplete_log.cc)9
-rw-r--r--chrome/browser/omnibox/omnibox_log.h (renamed from chrome/browser/autocomplete/autocomplete_log.h)14
-rw-r--r--chrome/browser/omnibox_search_hint.cc4
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor.cc7
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor.h4
-rw-r--r--chrome/browser/rlz/rlz_unittest.cc4
-rw-r--r--chrome/browser/ui/omnibox/omnibox_edit_model.cc6
-rw-r--r--chrome/chrome_browser.gypi4
13 files changed, 35 insertions, 37 deletions
diff --git a/chrome/browser/history/DEPS b/chrome/browser/history/DEPS
index da0759f..0c2e7a8 100644
--- a/chrome/browser/history/DEPS
+++ b/chrome/browser/history/DEPS
@@ -11,7 +11,6 @@ include_rules = [
#
# Do not add to the list of temporarily-allowed dependencies below,
# and please do not introduce more #includes of these files.
- "!chrome/browser/autocomplete/autocomplete_log.h",
"!chrome/browser/autocomplete/autocomplete_match.h",
"!chrome/browser/autocomplete/autocomplete_provider.h",
"!chrome/browser/autocomplete/autocomplete_result.h",
@@ -26,6 +25,7 @@ include_rules = [
"!chrome/browser/content_settings/cookie_settings.h",
"!chrome/browser/diagnostics/sqlite_diagnostics.h",
"!chrome/browser/omnibox/omnibox_field_trial.h",
+ "!chrome/browser/omnibox/omnibox_log.h",
"!chrome/browser/prefs/scoped_user_pref_update.h",
"!chrome/browser/prerender/prerender_contents.h",
"!chrome/browser/prerender/prerender_manager.h",
diff --git a/chrome/browser/history/shortcuts_backend.cc b/chrome/browser/history/shortcuts_backend.cc
index d7ba082..98f9c2ae 100644
--- a/chrome/browser/history/shortcuts_backend.cc
+++ b/chrome/browser/history/shortcuts_backend.cc
@@ -13,12 +13,12 @@
#include "base/guid.h"
#include "base/i18n/case_conversion.h"
#include "base/string_util.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/autocomplete_result.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/shortcuts_database.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/browser_thread.h"
@@ -245,7 +245,7 @@ void ShortcutsBackend::Observe(int type,
DCHECK(type == chrome::NOTIFICATION_OMNIBOX_OPENED_URL);
- AutocompleteLog* log = content::Details<AutocompleteLog>(details).ptr();
+ OmniboxLog* log = content::Details<OmniboxLog>(details).ptr();
string16 text_lowercase(base::i18n::ToLower(log->text));
const AutocompleteMatch& match(log->result.match_at(log->selected_index));
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index 66a010a..21356fd 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -24,12 +24,12 @@
#include "base/tracked_objects.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete_input.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/autocomplete_provider.h"
#include "chrome/browser/autocomplete/autocomplete_result.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_process_type.h"
@@ -1017,7 +1017,7 @@ void MetricsLog::WriteProfileMetrics(const std::string& profileidhash,
}
}
-void MetricsLog::RecordOmniboxOpenedURL(const AutocompleteLog& log) {
+void MetricsLog::RecordOmniboxOpenedURL(const OmniboxLog& log) {
DCHECK(!locked());
// Write the XML version.
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h
index 2d102d0..303720cbe 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -21,8 +21,8 @@
#include "chrome/browser/metrics/perf_provider_chromeos.h"
#endif
-struct AutocompleteLog;
class MetricsNetworkObserver;
+struct OmniboxLog;
class PrefService;
class PrefRegistrySimple;
@@ -110,7 +110,7 @@ class MetricsLog : public MetricsLogBase {
// Records the input text, available choices, and selected entry when the
// user uses the Omnibox to open a URL.
- void RecordOmniboxOpenedURL(const AutocompleteLog& log);
+ void RecordOmniboxOpenedURL(const OmniboxLog& log);
// Records the passed profiled data, which should be a snapshot of the
// browser's profiled performance during startup for a single process.
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index db2f67f..410dbb5 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -170,7 +170,6 @@
#include "base/tracked_objects.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/process_map.h"
@@ -183,14 +182,15 @@
#include "chrome/browser/metrics/tracking_synchronizer.h"
#include "chrome/browser/net/http_pipelining_compatibility_client.h"
#include "chrome/browser/net/network_stats.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_otr_state.h"
#include "chrome/common/child_process_logging.h"
-#include "chrome/common/chrome_process_type.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_process_type.h"
#include "chrome/common/chrome_result_codes.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/metrics/entropy_provider.h"
@@ -732,7 +732,7 @@ void MetricsService::Observe(int type,
static_cast<MetricsLog*>(log_manager_.current_log());
DCHECK(current_log);
current_log->RecordOmniboxOpenedURL(
- *content::Details<AutocompleteLog>(details).ptr());
+ *content::Details<OmniboxLog>(details).ptr());
break;
}
diff --git a/chrome/browser/autocomplete/autocomplete_log.cc b/chrome/browser/omnibox/omnibox_log.cc
index cbe05cf..9a80882 100644
--- a/chrome/browser/autocomplete/autocomplete_log.cc
+++ b/chrome/browser/omnibox/omnibox_log.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 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/autocomplete/autocomplete_log.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
-AutocompleteLog::AutocompleteLog(
+OmniboxLog::OmniboxLog(
const string16& text,
bool just_deleted_text,
AutocompleteInput::Type input_type,
@@ -30,5 +30,4 @@ AutocompleteLog::AutocompleteLog(
providers_info() {
}
-AutocompleteLog::~AutocompleteLog() {
-}
+OmniboxLog::~OmniboxLog() {}
diff --git a/chrome/browser/autocomplete/autocomplete_log.h b/chrome/browser/omnibox/omnibox_log.h
index 325f292..35a2fcd 100644
--- a/chrome/browser/autocomplete/autocomplete_log.h
+++ b/chrome/browser/omnibox/omnibox_log.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 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.
-#ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_LOG_H_
-#define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_LOG_H_
+#ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
+#define CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
#include <stddef.h>
@@ -18,8 +18,8 @@ class AutocompleteResult;
// The data to log (via the metrics service) when the user selects an item from
// the omnibox popup.
-struct AutocompleteLog {
- AutocompleteLog(
+struct OmniboxLog {
+ OmniboxLog(
const string16& text,
bool just_deleted_text,
AutocompleteInput::Type input_type,
@@ -31,7 +31,7 @@ struct AutocompleteLog {
size_t completed_length,
base::TimeDelta elapsed_time_since_last_change_to_default_match,
const AutocompleteResult& result);
- ~AutocompleteLog();
+ ~OmniboxLog();
// The user's input text in the omnibox.
string16 text;
@@ -83,4 +83,4 @@ struct AutocompleteLog {
ProvidersInfo providers_info;
};
-#endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_LOG_H_
+#endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index b888623..552aa7c 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -10,11 +10,11 @@
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/autocomplete_result.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar_service.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
@@ -219,7 +219,7 @@ void OmniboxSearchHint::Observe(int type,
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
HintInfoBarDelegate::Create(web_contents_, this);
} else if (type == chrome::NOTIFICATION_OMNIBOX_OPENED_URL) {
- AutocompleteLog* log = content::Details<AutocompleteLog>(details).ptr();
+ OmniboxLog* log = content::Details<OmniboxLog>(details).ptr();
AutocompleteMatch::Type type =
log->result.match_at(log->selected_index).type;
if (AutocompleteMatch::IsSearchType(type)) {
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc
index 184e7a7..1572d80 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor.cc
@@ -15,13 +15,13 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/autocomplete_result.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/in_memory_database.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/predictors/autocomplete_action_predictor_factory.h"
#include "chrome/browser/predictors/predictor_database.h"
#include "chrome/browser/predictors/predictor_database_factory.h"
@@ -243,7 +243,7 @@ void AutocompleteActionPredictor::Observe(
// TODO(dominich): This doesn't need to be synchronous. Investigate
// posting it as a task to be run later.
- OnOmniboxOpenedUrl(*content::Details<AutocompleteLog>(details).ptr());
+ OnOmniboxOpenedUrl(*content::Details<OmniboxLog>(details).ptr());
break;
}
@@ -322,8 +322,7 @@ void AutocompleteActionPredictor::DeleteRowsWithURLs(
DATABASE_ACTION_DELETE_SOME, DATABASE_ACTION_COUNT);
}
-void AutocompleteActionPredictor::OnOmniboxOpenedUrl(
- const AutocompleteLog& log) {
+void AutocompleteActionPredictor::OnOmniboxOpenedUrl(const OmniboxLog& log) {
if (log.text.length() < kMinimumUserTextLength)
return;
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.h b/chrome/browser/predictors/autocomplete_action_predictor.h
index ae19aaa..541744e 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor.h
+++ b/chrome/browser/predictors/autocomplete_action_predictor.h
@@ -20,10 +20,10 @@
#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
-struct AutocompleteLog;
struct AutocompleteMatch;
class AutocompleteResult;
class HistoryService;
+struct OmniboxLog;
class PredictorsHandler;
class Profile;
@@ -163,7 +163,7 @@ class AutocompleteActionPredictor
void DeleteRowsWithURLs(const history::URLRows& rows);
// Called when NOTIFICATION_OMNIBOX_OPENED_URL is observed.
- void OnOmniboxOpenedUrl(const AutocompleteLog& log);
+ void OnOmniboxOpenedUrl(const OmniboxLog& log);
// Adds and updates rows in the database and caches.
void AddAndUpdateRows(
diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc
index 436dbf8..84cb297 100644
--- a/chrome/browser/rlz/rlz_unittest.cc
+++ b/chrome/browser/rlz/rlz_unittest.cc
@@ -11,8 +11,8 @@
#include "base/stringprintf.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/env_vars.h"
@@ -291,7 +291,7 @@ void RlzLibTest::SetRegistryBrandValue(const wchar_t* name,
void RlzLibTest::SimulateOmniboxUsage() {
tracker_.Observe(chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
content::NotificationService::AllSources(),
- content::Details<AutocompleteLog>(NULL));
+ content::Details<OmniboxLog>(NULL));
}
void RlzLibTest::SimulateHomepageUsage() {
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 0728b2f..346a89c 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/autocomplete/autocomplete_classifier.h"
#include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
#include "chrome/browser/autocomplete/autocomplete_input.h"
-#include "chrome/browser/autocomplete/autocomplete_log.h"
#include "chrome/browser/autocomplete/autocomplete_provider.h"
#include "chrome/browser/autocomplete/extension_app_provider.h"
#include "chrome/browser/autocomplete/history_url_provider.h"
@@ -29,6 +28,7 @@
#include "chrome/browser/google/google_url_tracker.h"
#include "chrome/browser/net/predictor.h"
#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/browser/omnibox/omnibox_log.h"
#include "chrome/browser/predictors/autocomplete_action_predictor.h"
#include "chrome/browser/predictors/autocomplete_action_predictor_factory.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
@@ -645,7 +645,7 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match,
base::TimeDelta::FromMilliseconds(-1);
}
// TODO(sreeram): Handle is_temporary_text_set_by_instant_ correctly.
- AutocompleteLog log(
+ OmniboxLog log(
autocomplete_controller()->input().text(),
just_deleted_text_,
autocomplete_controller()->input().type(),
@@ -686,7 +686,7 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match,
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
content::Source<Profile>(profile_),
- content::Details<AutocompleteLog>(&log));
+ content::Details<OmniboxLog>(&log));
HISTOGRAM_ENUMERATION("Omnibox.EventCount", 1, 2);
}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 2c1fa67..590ab17 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -130,8 +130,6 @@
'browser/autocomplete/autocomplete_controller_delegate.h',
'browser/autocomplete/autocomplete_input.cc',
'browser/autocomplete/autocomplete_input.h',
- 'browser/autocomplete/autocomplete_log.cc',
- 'browser/autocomplete/autocomplete_log.h',
'browser/autocomplete/autocomplete_match.cc',
'browser/autocomplete/autocomplete_match.h',
'browser/autocomplete/autocomplete_provider.cc',
@@ -1236,6 +1234,8 @@
'browser/omnibox_search_hint.h',
'browser/omnibox/omnibox_field_trial.cc',
'browser/omnibox/omnibox_field_trial.h',
+ 'browser/omnibox/omnibox_log.cc',
+ 'browser/omnibox/omnibox_log.h',
'browser/page_cycler/page_cycler.cc',
'browser/page_cycler/page_cycler.h',
'browser/parsers/metadata_parser.cc',