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

Unified Diff: chrome/browser/process_singleton_win.cc

Issue 11066102: Fix a regression which caused Chrome to always launch in Windows 8 mode on tablets. This was caused… (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: chrome/browser/process_singleton_win.cc
===================================================================
--- chrome/browser/process_singleton_win.cc (revision 160963)
+++ chrome/browser/process_singleton_win.cc (working copy)
@@ -26,6 +26,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/shell_util.h"
@@ -201,16 +202,19 @@
if (default_user_data_dir != user_data_dir)
return false;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall))
gab 2012/10/11 01:55:48 I feel this is a special case hiding a bigger prob
+ return false;
+
base::win::RegKey reg_key;
LONG key_result = reg_key.Create(HKEY_CURRENT_USER,
chrome::kMetroRegistryPath,
KEY_READ);
if (key_result == ERROR_SUCCESS) {
DWORD reg_value = 0;
- reg_key.ReadValueDW(chrome::kLaunchModeValue,
- &reg_value);
- if (reg_value == 1)
- return true;
+ if (reg_key.ReadValueDW(chrome::kLaunchModeValue, &reg_value)
gab 2012/10/11 01:55:48 Isn't it simpler to have a single if for the logic
+ == ERROR_SUCCESS) {
+ return reg_value == 1;
+ }
}
return base::win::IsMachineATablet();
}
« 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