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

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

Issue 202993002: Fix "unreachable code" warnings (MSVC warning 4702) in chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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
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"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // TODO(ananta) 189 // TODO(ananta)
190 // Move this function to a common place as the Windows 8 delegate_execute 190 // Move this function to a common place as the Windows 8 delegate_execute
191 // handler can possibly use this. 191 // handler can possibly use this.
192 bool ShouldLaunchInWindows8ImmersiveMode(const base::FilePath& user_data_dir) { 192 bool ShouldLaunchInWindows8ImmersiveMode(const base::FilePath& user_data_dir) {
193 #if defined(USE_AURA) 193 #if defined(USE_AURA)
194 // Returning false from this function doesn't mean we don't launch immersive 194 // Returning false from this function doesn't mean we don't launch immersive
195 // mode in Aura. This function is specifically called in case when we need 195 // mode in Aura. This function is specifically called in case when we need
196 // to relaunch desktop launched chrome into immersive mode through 'relaunch' 196 // to relaunch desktop launched chrome into immersive mode through 'relaunch'
197 // menu. In case of Aura, we will use delegate_execute to do the relaunch. 197 // menu. In case of Aura, we will use delegate_execute to do the relaunch.
198 return false; 198 return false;
199 #endif 199 #else
200
201 if (base::win::GetVersion() < base::win::VERSION_WIN8) 200 if (base::win::GetVersion() < base::win::VERSION_WIN8)
202 return false; 201 return false;
203 202
204 if (base::win::IsProcessImmersive(base::GetCurrentProcessHandle())) 203 if (base::win::IsProcessImmersive(base::GetCurrentProcessHandle()))
205 return false; 204 return false;
206 205
207 if (ShellIntegration::GetDefaultBrowser() != ShellIntegration::IS_DEFAULT) 206 if (ShellIntegration::GetDefaultBrowser() != ShellIntegration::IS_DEFAULT)
208 return false; 207 return false;
209 208
210 base::IntegrityLevel integrity_level = base::INTEGRITY_UNKNOWN; 209 base::IntegrityLevel integrity_level = base::INTEGRITY_UNKNOWN;
(...skipping 11 matching lines...) Expand all
222 221
223 base::win::RegKey reg_key; 222 base::win::RegKey reg_key;
224 DWORD reg_value = 0; 223 DWORD reg_value = 0;
225 if (reg_key.Create(HKEY_CURRENT_USER, chrome::kMetroRegistryPath, 224 if (reg_key.Create(HKEY_CURRENT_USER, chrome::kMetroRegistryPath,
226 KEY_READ) == ERROR_SUCCESS && 225 KEY_READ) == ERROR_SUCCESS &&
227 reg_key.ReadValueDW(chrome::kLaunchModeValue, 226 reg_key.ReadValueDW(chrome::kLaunchModeValue,
228 &reg_value) == ERROR_SUCCESS) { 227 &reg_value) == ERROR_SUCCESS) {
229 return reg_value == 1; 228 return reg_value == 1;
230 } 229 }
231 return base::win::IsTouchEnabledDevice(); 230 return base::win::IsTouchEnabledDevice();
231 #endif
232 } 232 }
233 233
234 } // namespace 234 } // namespace
235 235
236 // Microsoft's Softricity virtualization breaks the sandbox processes. 236 // Microsoft's Softricity virtualization breaks the sandbox processes.
237 // So, if we detect the Softricity DLL we use WMI Win32_Process.Create to 237 // So, if we detect the Softricity DLL we use WMI Win32_Process.Create to
238 // break out of the virtualization environment. 238 // break out of the virtualization environment.
239 // http://code.google.com/p/chromium/issues/detail?id=43650 239 // http://code.google.com/p/chromium/issues/detail?id=43650
240 bool ProcessSingleton::EscapeVirtualization( 240 bool ProcessSingleton::EscapeVirtualization(
241 const base::FilePath& user_data_dir) { 241 const base::FilePath& user_data_dir) {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 ::SetEvent(metro_activation_event); 455 ::SetEvent(metro_activation_event);
456 } 456 }
457 } 457 }
458 } 458 }
459 459
460 return window_.hwnd() != NULL; 460 return window_.hwnd() != NULL;
461 } 461 }
462 462
463 void ProcessSingleton::Cleanup() { 463 void ProcessSingleton::Cleanup() {
464 } 464 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.cc ('k') | chrome/browser/renderer_context_menu/context_menu_content_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698