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

Side by Side Diff: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" 5 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/autocomplete/shortcuts_backend.h" 8 #include "chrome/browser/autocomplete/shortcuts_backend.h"
9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
10 #include "chrome/browser/history/history_service.h" 10 #include "chrome/browser/history/history_service.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Tell the history system to remove any saved search term for the search. 77 // Tell the history system to remove any saved search term for the search.
78 HistoryService* const history_service = 78 HistoryService* const history_service =
79 HistoryServiceFactory::GetForProfile(profile_, Profile::IMPLICIT_ACCESS); 79 HistoryServiceFactory::GetForProfile(profile_, Profile::IMPLICIT_ACCESS);
80 if (history_service) 80 if (history_service)
81 history_service->DeleteKeywordSearchTermForURL(search_url_); 81 history_service->DeleteKeywordSearchTermForURL(search_url_);
82 82
83 // Pretend the user typed this URL, so that navigating to it will be the 83 // Pretend the user typed this URL, so that navigating to it will be the
84 // default action when it's typed again in the future. 84 // default action when it's typed again in the future.
85 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( 85 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
86 content::OpenURLParams(match_.destination_url, content::Referrer(), 86 content::OpenURLParams(match_.destination_url, content::Referrer(),
87 disposition, content::PAGE_TRANSITION_TYPED, 87 disposition, ui::PAGE_TRANSITION_TYPED,
88 false)); 88 false));
89 89
90 // We should always close, even if the navigation did not occur within this 90 // We should always close, even if the navigation did not occur within this
91 // WebContents. 91 // WebContents.
92 return true; 92 return true;
93 } 93 }
94 94
95 int AlternateNavInfoBarDelegate::GetIconID() const { 95 int AlternateNavInfoBarDelegate::GetIconID() const {
96 return IDR_INFOBAR_ALT_NAV_URL; 96 return IDR_INFOBAR_ALT_NAV_URL;
97 } 97 }
98 98
99 infobars::InfoBarDelegate::Type AlternateNavInfoBarDelegate::GetInfoBarType() 99 infobars::InfoBarDelegate::Type AlternateNavInfoBarDelegate::GetInfoBarType()
100 const { 100 const {
101 return PAGE_ACTION_TYPE; 101 return PAGE_ACTION_TYPE;
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt_browsertest.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698