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

Issue 11066102: Fix a regression which caused Chrome to always launch in Windows 8 mode on tablets. This was caused… (Closed)

Created:
8 years, 2 months ago by ananta
Modified:
8 years, 2 months ago
Reviewers:
gab, sky
CC:
chromium-reviews
Visibility:
Public.

Description

Fix a regression which caused Chrome to always launch in Windows 8 mode on tablets. This was caused by my change to fix bug http://code.google.com/p/chromium/issues/detail?id=153318 which attempted to activate chrome in Windows 8 mode if the previous launch mode was Windows 8. We also don't attempt to activate into metro if the command line contains the uninstall switch. BUG=154663 R=sky Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=161217

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M chrome/browser/process_singleton_win.cc View 1 2 chunks +8 lines, -4 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
ananta
8 years, 2 months ago (2012-10-10 18:25:21 UTC) #1
sky
LGTM
8 years, 2 months ago (2012-10-10 20:54:46 UTC) #2
sky
SLGTM
8 years, 2 months ago (2012-10-10 22:05:16 UTC) #3
gab
8 years, 2 months ago (2012-10-11 01:55:48 UTC) #4
See discussion inline.

https://codereview.chromium.org/11066102/diff/1003/chrome/browser/process_sin...
File chrome/browser/process_singleton_win.cc (right):

https://codereview.chromium.org/11066102/diff/1003/chrome/browser/process_sin...
chrome/browser/process_singleton_win.cc:205: if
(CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall))
I feel this is a special case hiding a bigger problem (i.e. there are other
short-lived switches for chrome.exe which are likely broken in the same way
now).

https://codereview.chromium.org/11066102/diff/1003/chrome/browser/process_sin...
chrome/browser/process_singleton_win.cc:214: if
(reg_key.ReadValueDW(chrome::kLaunchModeValue, &reg_value)
Isn't it simpler to have a single if for the logic here and above? i.e.:

if (reg_key.Create(...) == ERROR_SUCCESS &&
    reg_key.ReadValueDW(...) == ERROR_SUCCESS) {
  return reg_value == 1;
}

Powered by Google App Engine
This is Rietveld 408576698