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

Side by Side Diff: win8/delegate_execute/command_execute_impl.cc

Issue 50883005: Fixing issue of default launch mode when registry key is not present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | 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 // Implementation of the CommandExecuteImpl class which implements the 4 // Implementation of the CommandExecuteImpl class which implements the
5 // IExecuteCommand and related interfaces for handling ShellExecute based 5 // IExecuteCommand and related interfaces for handling ShellExecute based
6 // launches of the Chrome browser. 6 // launches of the Chrome browser.
7 7
8 #include "win8/delegate_execute/command_execute_impl.h" 8 #include "win8/delegate_execute/command_execute_impl.h"
9 9
10 #include <shlguid.h> 10 #include <shlguid.h>
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (launch_mode_determined) { 547 if (launch_mode_determined) {
548 AtlTrace("Launch mode forced by cmdline to %s\n", modes[launch_mode]); 548 AtlTrace("Launch mode forced by cmdline to %s\n", modes[launch_mode]);
549 reg_key.WriteValue(chrome::kLaunchModeValue, 549 reg_key.WriteValue(chrome::kLaunchModeValue,
550 static_cast<DWORD>(launch_mode)); 550 static_cast<DWORD>(launch_mode));
551 return launch_mode; 551 return launch_mode;
552 } 552 }
553 553
554 DWORD reg_value; 554 DWORD reg_value;
555 if (reg_key.ReadValueDW(chrome::kLaunchModeValue, 555 if (reg_key.ReadValueDW(chrome::kLaunchModeValue,
556 &reg_value) != ERROR_SUCCESS) { 556 &reg_value) != ERROR_SUCCESS) {
557 launch_mode = base::win::IsTouchEnabledDevice() ? 557 launch_mode = ECHUIM_DESKTOP;
558 ECHUIM_IMMERSIVE : ECHUIM_DESKTOP;
559 AtlTrace("Launch mode forced by heuristics to %s\n", modes[launch_mode]); 558 AtlTrace("Launch mode forced by heuristics to %s\n", modes[launch_mode]);
560 } else if (reg_value >= ECHUIM_SYSTEM_LAUNCHER) { 559 } else if (reg_value >= ECHUIM_SYSTEM_LAUNCHER) {
561 AtlTrace("Invalid registry launch mode value %u\n", reg_value); 560 AtlTrace("Invalid registry launch mode value %u\n", reg_value);
562 launch_mode = ECHUIM_DESKTOP; 561 launch_mode = ECHUIM_DESKTOP;
563 } else { 562 } else {
564 launch_mode = static_cast<EC_HOST_UI_MODE>(reg_value); 563 launch_mode = static_cast<EC_HOST_UI_MODE>(reg_value);
565 AtlTrace("Launch mode forced by registry to %s\n", modes[launch_mode]); 564 AtlTrace("Launch mode forced by registry to %s\n", modes[launch_mode]);
566 } 565 }
567 566
568 launch_mode_determined = true; 567 launch_mode_determined = true;
569 return launch_mode; 568 return launch_mode;
570 } 569 }
OLDNEW
« 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