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

Unified Diff: win8/metro_driver/chrome_url_launch_handler.cc

Issue 11193007: Fix a crash seen at times when chrome in desktop mode attempts to activate Chrome in Windows 8 mode… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/chrome_url_launch_handler.cc
===================================================================
--- win8/metro_driver/chrome_url_launch_handler.cc (revision 161954)
+++ win8/metro_driver/chrome_url_launch_handler.cc (working copy)
@@ -102,6 +102,10 @@
// are encoded in |launch_args| they are ignored.
string16 ChromeUrlLaunchHandler::GetUrlFromLaunchArgs(
const string16& launch_args) {
+ if (launch_args == L"opennewwindow") {
+ VLOG(1) << "Returning new tab url";
+ return L"chrome://newtab";
+ }
string16 dummy_command_line(L"dummy.exe ");
dummy_command_line.append(launch_args);
CommandLine command_line = CommandLine::FromString(dummy_command_line);
@@ -179,6 +183,11 @@
DVLOG(1) << (url ? url : L"NULL url");
DVLOG(1) << (search_string ? search_string : L"NULL search string");
+ if (globals.host_windows.empty()) {
+ DVLOG(1) << "No chrome windows registered. Ignoring nav request";
+ return;
+ }
+
// Custom registered message to navigate or search in chrome. WPARAM
// points to the URL and LPARAM contains the search string. They are
// mutually exclusive.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698