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

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 1410333006: Enough hacks to make wstring printfs unneeded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 } 1484 }
1485 1485
1486 bool ShortcutOpListOrRemoveUnknownArgs( 1486 bool ShortcutOpListOrRemoveUnknownArgs(
1487 bool do_removal, 1487 bool do_removal,
1488 std::vector<std::pair<base::FilePath, base::string16> >* shortcuts, 1488 std::vector<std::pair<base::FilePath, base::string16> >* shortcuts,
1489 const base::FilePath& shortcut_path) { 1489 const base::FilePath& shortcut_path) {
1490 base::string16 args; 1490 base::string16 args;
1491 if (!base::win::ResolveShortcut(shortcut_path, NULL, &args)) 1491 if (!base::win::ResolveShortcut(shortcut_path, NULL, &args))
1492 return false; 1492 return false;
1493 1493
1494 base::CommandLine current_args(base::CommandLine::FromString( 1494 base::CommandLine current_args(base::CommandLine::FromString(L""));
1495 base::StringPrintf(L"unused_program %ls", args.c_str()))); 1495 //base::StringPrintf(L"unused_program %ls", args.c_str())));
brucedawson 2015/10/20 21:43:00 String printing of arguments.
1496 const char* const kept_switches[] = { 1496 const char* const kept_switches[] = {
1497 switches::kApp, 1497 switches::kApp,
1498 switches::kAppId, 1498 switches::kAppId,
1499 switches::kShowAppList, 1499 switches::kShowAppList,
1500 switches::kProfileDirectory, 1500 switches::kProfileDirectory,
1501 }; 1501 };
1502 base::CommandLine desired_args(base::CommandLine::NO_PROGRAM); 1502 base::CommandLine desired_args(base::CommandLine::NO_PROGRAM);
1503 desired_args.CopySwitchesFrom(current_args, kept_switches, 1503 desired_args.CopySwitchesFrom(current_args, kept_switches,
1504 arraysize(kept_switches)); 1504 arraysize(kept_switches));
1505 if (desired_args.argv().size() == current_args.argv().size()) 1505 if (desired_args.argv().size() == current_args.argv().size())
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 base::string16 key_path(ShellUtil::kRegClasses); 2565 base::string16 key_path(ShellUtil::kRegClasses);
2566 key_path.push_back(base::FilePath::kSeparators[0]); 2566 key_path.push_back(base::FilePath::kSeparators[0]);
2567 key_path.append(prog_id); 2567 key_path.append(prog_id);
2568 return InstallUtil::DeleteRegistryKey( 2568 return InstallUtil::DeleteRegistryKey(
2569 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default); 2569 HKEY_CURRENT_USER, key_path, WorkItem::kWow64Default);
2570 2570
2571 // TODO(mgiuca): Remove the extension association entries. This requires that 2571 // TODO(mgiuca): Remove the extension association entries. This requires that
2572 // the extensions associated with a particular prog_id are stored in that 2572 // the extensions associated with a particular prog_id are stored in that
2573 // prog_id's key. 2573 // prog_id's key.
2574 } 2574 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698