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

Side by Side Diff: chrome/browser/process_singleton_win.cc

Issue 329393004: No longer relaunch into metro mode by default on touch devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete more code! Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/first_run/first_run_unittest.cc ('k') | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/process/kill.h" 14 #include "base/process/kill.h"
15 #include "base/process/process_info.h" 15 #include "base/process/process_info.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "base/win/metro.h" 20 #include "base/win/metro.h"
21 #include "base/win/registry.h" 21 #include "base/win/registry.h"
22 #include "base/win/scoped_handle.h" 22 #include "base/win/scoped_handle.h"
23 #include "base/win/win_util.h"
24 #include "base/win/windows_version.h" 23 #include "base/win/windows_version.h"
25 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
26 #include "chrome/browser/browser_process_platform_part.h" 25 #include "chrome/browser/browser_process_platform_part.h"
27 #include "chrome/browser/chrome_process_finder_win.h" 26 #include "chrome/browser/chrome_process_finder_win.h"
28 #include "chrome/browser/metro_utils/metro_chrome_win.h" 27 #include "chrome/browser/metro_utils/metro_chrome_win.h"
29 #include "chrome/browser/shell_integration.h" 28 #include "chrome/browser/shell_integration.h"
30 #include "chrome/browser/ui/simple_message_box.h" 29 #include "chrome/browser/ui/simple_message_box.h"
31 #include "chrome/common/chrome_constants.h" 30 #include "chrome/common/chrome_constants.h"
32 #include "chrome/common/chrome_paths.h" 31 #include "chrome/common/chrome_paths.h"
33 #include "chrome/common/chrome_paths_internal.h" 32 #include "chrome/common/chrome_paths_internal.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return false; 219 return false;
221 220
222 base::win::RegKey reg_key; 221 base::win::RegKey reg_key;
223 DWORD reg_value = 0; 222 DWORD reg_value = 0;
224 if (reg_key.Create(HKEY_CURRENT_USER, chrome::kMetroRegistryPath, 223 if (reg_key.Create(HKEY_CURRENT_USER, chrome::kMetroRegistryPath,
225 KEY_READ) == ERROR_SUCCESS && 224 KEY_READ) == ERROR_SUCCESS &&
226 reg_key.ReadValueDW(chrome::kLaunchModeValue, 225 reg_key.ReadValueDW(chrome::kLaunchModeValue,
227 &reg_value) == ERROR_SUCCESS) { 226 &reg_value) == ERROR_SUCCESS) {
228 return reg_value == 1; 227 return reg_value == 1;
229 } 228 }
230 return base::win::IsTouchEnabledDevice(); 229 return false;
231 #endif 230 #endif
232 } 231 }
233 232
234 } // namespace 233 } // namespace
235 234
236 // Microsoft's Softricity virtualization breaks the sandbox processes. 235 // Microsoft's Softricity virtualization breaks the sandbox processes.
237 // So, if we detect the Softricity DLL we use WMI Win32_Process.Create to 236 // So, if we detect the Softricity DLL we use WMI Win32_Process.Create to
238 // break out of the virtualization environment. 237 // break out of the virtualization environment.
239 // http://code.google.com/p/chromium/issues/detail?id=43650 238 // http://code.google.com/p/chromium/issues/detail?id=43650
240 bool ProcessSingleton::EscapeVirtualization( 239 bool ProcessSingleton::EscapeVirtualization(
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 ::SetEvent(metro_activation_event); 454 ::SetEvent(metro_activation_event);
456 } 455 }
457 } 456 }
458 } 457 }
459 458
460 return window_.hwnd() != NULL; 459 return window_.hwnd() != NULL;
461 } 460 }
462 461
463 void ProcessSingleton::Cleanup() { 462 void ProcessSingleton::Cleanup() {
464 } 463 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_unittest.cc ('k') | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698