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

Side by Side Diff: chrome/browser/platform_util_chromeos.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, 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/chromeos/file_manager/open_util.h" 9 #include "chrome/browser/chromeos/file_manager/open_util.h"
10 #include "chrome/browser/platform_util_internal.h" 10 #include "chrome/browser/platform_util_internal.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // This code should be obsolete since we have default handlers in ChromeOS 101 // This code should be obsolete since we have default handlers in ChromeOS
102 // which should handle this. However - there are two things which make it 102 // which should handle this. However - there are two things which make it
103 // necessary to keep it in: 103 // necessary to keep it in:
104 // a.) The user might have deleted the default handler in this session. 104 // a.) The user might have deleted the default handler in this session.
105 // In this case we would need to have this in place. 105 // In this case we would need to have this in place.
106 // b.) There are several code paths which are not clear if they would call 106 // b.) There are several code paths which are not clear if they would call
107 // this function directly and which would therefore break (e.g. 107 // this function directly and which would therefore break (e.g.
108 // "Browser::EmailPageLocation" (to name only one). 108 // "Browser::EmailPageLocation" (to name only one).
109 // As such we should keep this code here. 109 // As such we should keep this code here.
110 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); 110 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK);
111 params.disposition = NEW_FOREGROUND_TAB; 111 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
112 112
113 if (url.SchemeIs("mailto")) { 113 if (url.SchemeIs("mailto")) {
114 std::string string_url = kGmailComposeUrl; 114 std::string string_url = kGmailComposeUrl;
115 string_url.append(url.spec()); 115 string_url.append(url.spec());
116 params.url = GURL(url); 116 params.url = GURL(url);
117 } 117 }
118 118
119 chrome::Navigate(&params); 119 chrome::Navigate(&params);
120 } 120 }
121 121
122 } // namespace platform_util 122 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_browsertest.cc ('k') | chrome/browser/plugins/plugin_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698