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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « chrome/browser/ui/omnibox/omnibox_edit_model.h ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index d0c976dd48b17ebd327c70794a1145b8079e250f..3550347c6b5098500f577a9ce44cdc1bc965eecb 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -119,7 +119,7 @@ const int kPercentageMatchHistogramWidthBuckets[] = { 400, 700, 1200 };
void RecordPercentageMatchHistogram(const base::string16& old_text,
const base::string16& new_text,
bool url_replacement_active,
- content::PageTransition transition,
+ ui::PageTransition transition,
int omnibox_width) {
size_t avg_length = (old_text.length() + new_text.length()) / 2;
@@ -135,7 +135,7 @@ void RecordPercentageMatchHistogram(const base::string16& old_text,
std::string histogram_name;
if (url_replacement_active) {
- if (transition == content::PAGE_TRANSITION_TYPED) {
+ if (transition == ui::PAGE_TRANSITION_TYPED) {
histogram_name = "InstantExtended.PercentageMatchV2_QuerytoURL";
UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent);
} else {
@@ -143,7 +143,7 @@ void RecordPercentageMatchHistogram(const base::string16& old_text,
UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent);
}
} else {
- if (transition == content::PAGE_TRANSITION_TYPED) {
+ if (transition == ui::PAGE_TRANSITION_TYPED) {
histogram_name = "InstantExtended.PercentageMatchV2_URLtoURL";
UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent);
} else {
@@ -669,7 +669,7 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition,
if (!match.destination_url.is_valid())
return;
- if ((match.transition == content::PAGE_TRANSITION_TYPED) &&
+ if ((match.transition == ui::PAGE_TRANSITION_TYPED) &&
(match.destination_url == PermanentURL())) {
// When the user hit enter on the existing permanent URL, treat it like a
// reload for scoring purposes. We could detect this by just checking
@@ -680,13 +680,13 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition,
// different from the current URL, even if it wound up at the same place
// (e.g. manually retyping the same search query), and it seems wrong to
// treat this as a reload.
- match.transition = content::PAGE_TRANSITION_RELOAD;
+ match.transition = ui::PAGE_TRANSITION_RELOAD;
} else if (for_drop || ((paste_state_ != NONE) &&
match.is_history_what_you_typed_match)) {
// When the user pasted in a URL and hit enter, score it like a link click
// rather than a normal typed URL, so it doesn't get inline autocompleted
// as aggressively later.
- match.transition = content::PAGE_TRANSITION_LINK;
+ match.transition = ui::PAGE_TRANSITION_LINK;
}
TemplateURLService* service =
@@ -792,7 +792,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
TemplateURLServiceFactory::GetForProfile(profile_);
TemplateURL* template_url = match.GetTemplateURL(service, false);
if (template_url) {
- if (match.transition == content::PAGE_TRANSITION_KEYWORD) {
+ if (match.transition == ui::PAGE_TRANSITION_KEYWORD) {
// The user is using a non-substituting keyword or is explicitly in
// keyword mode.
@@ -809,7 +809,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
TemplateURLServiceFactory::GetForProfile(profile_)->IncrementUsageCount(
template_url);
} else {
- DCHECK_EQ(content::PAGE_TRANSITION_GENERATED, match.transition);
+ DCHECK_EQ(ui::PAGE_TRANSITION_GENERATED, match.transition);
// NOTE: We purposefully don't increment the usage count of the default
// search engine here like we do for explicit keywords above; see comments
// in template_url.h.
@@ -848,8 +848,8 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
base::AutoReset<bool> tmp(&in_revert_, true);
controller_->OnAutocompleteAccept(
match.destination_url, disposition,
- content::PageTransitionFromInt(
- match.transition | content::PAGE_TRANSITION_FROM_ADDRESS_BAR));
+ ui::PageTransitionFromInt(
+ match.transition | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR));
if (observer->load_state() != OmniboxNavigationObserver::LOAD_NOT_SEEN)
ignore_result(observer.release()); // The observer will delete itself.
}
@@ -1339,7 +1339,7 @@ void OmniboxEditModel::GetInfoForCurrentText(AutocompleteMatch* match,
match->provider = autocomplete_controller()->search_provider();
match->destination_url =
delegate_->GetNavigationController().GetVisibleEntry()->GetURL();
- match->transition = content::PAGE_TRANSITION_RELOAD;
+ match->transition = ui::PAGE_TRANSITION_RELOAD;
} else if (query_in_progress() ||
(popup_model() && popup_model()->IsOpen())) {
if (query_in_progress()) {
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.h ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698