summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/shell_util.cc
diff options
context:
space:
mode:
authorpauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-14 17:58:36 +0000
committerpauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-14 17:58:36 +0000
commit3ae13e0deb8744e78cb8827c44d1247b37a1cd6e (patch)
tree51fc3a31b155f1d04653a436122e3b4603e23a32 /chrome/installer/util/shell_util.cc
parentd9e601a1cbce07c4733f54fafdc6f0b2d213df05 (diff)
downloadchromium_src-3ae13e0deb8744e78cb8827c44d1247b37a1cd6e.zip
chromium_src-3ae13e0deb8744e78cb8827c44d1247b37a1cd6e.tar.gz
chromium_src-3ae13e0deb8744e78cb8827c44d1247b37a1cd6e.tar.bz2
Revert 244708 "Manual profile reset: reset shortcuts on Windows."
Looks like it causes ProfileSettingsResetWebUITest.testOpenProfileSettingsReset to fail most of the time. > Manual profile reset: reset shortcuts on Windows. > > BUG=324931 > > Review URL: https://codereview.chromium.org/116143003 TBR=vasilii@chromium.org Review URL: https://codereview.chromium.org/134873009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/shell_util.cc')
-rw-r--r--chrome/installer/util/shell_util.cc50
1 files changed, 0 insertions, 50 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index c6ae322..f5e3851 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -30,7 +30,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "base/win/registry.h"
@@ -1293,37 +1292,6 @@ bool ShortcutOpRetarget(const base::FilePath& old_target,
return result;
}
-bool ShortcutOpListOrRemoveUnknownArgs(
- bool do_removal,
- std::vector<std::pair<base::FilePath, base::string16> >* shortcuts,
- const base::FilePath& shortcut_path) {
- base::string16 args;
- if (!base::win::ResolveShortcut(shortcut_path, NULL, &args))
- return false;
-
- CommandLine current_args(CommandLine::FromString(base::StringPrintf(
- L"unused_program %ls", args.c_str())));
- const char* const kept_switches[] = {
- switches::kApp,
- switches::kAppId,
- switches::kShowAppList,
- switches::kProfileDirectory,
- };
- CommandLine desired_args(CommandLine::NO_PROGRAM);
- desired_args.CopySwitchesFrom(current_args, kept_switches,
- arraysize(kept_switches));
- if (desired_args.argv().size() == current_args.argv().size())
- return true;
- if (shortcuts)
- shortcuts->push_back(std::make_pair(shortcut_path, args));
- if (!do_removal)
- return true;
- base::win::ShortcutProperties updated_properties;
- updated_properties.set_arguments(desired_args.GetArgumentsString());
- return base::win::CreateOrUpdateShortcutLink(
- shortcut_path, updated_properties, base::win::SHORTCUT_UPDATE_EXISTING);
-}
-
// {|location|, |dist|, |level|} determine |shortcut_folder|.
// For each shortcut in |shortcut_folder| that match |shortcut_filter|, apply
// |shortcut_operation|. Returns true if all operations are successful.
@@ -2169,24 +2137,6 @@ bool ShellUtil::RetargetShortcutsWithArgs(
shortcut_operation, location, dist, level);
}
-// static
-bool ShellUtil::ShortcutListMaybeRemoveUnknownArgs(
- ShellUtil::ShortcutLocation location,
- BrowserDistribution* dist,
- ShellChange level,
- const base::FilePath& chrome_exe,
- bool do_removal,
- std::vector<std::pair<base::FilePath, base::string16> >* shortcuts) {
- if (!ShellUtil::ShortcutLocationIsSupported(location))
- return false;
- DCHECK(dist);
- FilterTargetEq shortcut_filter(chrome_exe, true);
- ShortcutOperationCallback shortcut_operation(
- base::Bind(&ShortcutOpListOrRemoveUnknownArgs, do_removal, shortcuts));
- return BatchShortcutAction(shortcut_filter.AsShortcutFilterCallback(),
- shortcut_operation, location, dist, level);
-}
-
bool ShellUtil::GetUserSpecificRegistrySuffix(base::string16* suffix) {
// Use a thread-safe cache for the user's suffix.
static base::LazyInstance<UserSpecificRegistrySuffix>::Leaky suffix_instance =