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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 | « chrome/browser/ui/browser_focus_uitest.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index 08b8d6f1da05d659ee8e2ef1b755bef1e9438fb2..442ba27528f6a09c7aa5bbeaf465d46467199f60 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -106,14 +106,16 @@ BrowserInstantController::~BrowserInstantController() {
bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition,
const GURL& url) {
// Unsupported dispositions.
- if (disposition == NEW_BACKGROUND_TAB || disposition == NEW_WINDOW ||
- disposition == NEW_FOREGROUND_TAB)
+ if (disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB ||
+ disposition == WindowOpenDisposition::NEW_WINDOW ||
+ disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB)
return false;
// The omnibox currently doesn't use other dispositions, so we don't attempt
// to handle them. If you hit this DCHECK file a bug and I'll (sky) add
// support for the new disposition.
- DCHECK(disposition == CURRENT_TAB) << disposition;
+ DCHECK(disposition == WindowOpenDisposition::CURRENT_TAB)
+ << static_cast<int>(disposition);
const base::string16& search_terms =
search::ExtractSearchTermsFromURL(profile(), url);
« no previous file with comments | « chrome/browser/ui/browser_focus_uitest.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698