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

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

Issue 1289333005: Change shortcut install location to non-subdir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move shortcut instead of delete/create 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 declares methods that are useful for integrating Chrome in 5 // This file declares methods that are useful for integrating Chrome in
6 // Windows shell. These methods are all static and currently part of 6 // Windows shell. These methods are all static and currently part of
7 // ShellUtil class. 7 // ShellUtil class.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 // Sets |path| to the path for a shortcut at the |location| desired for the 324 // Sets |path| to the path for a shortcut at the |location| desired for the
325 // given |level| (CURRENT_USER for per-user path and SYSTEM_LEVEL for 325 // given |level| (CURRENT_USER for per-user path and SYSTEM_LEVEL for
326 // all-users path). 326 // all-users path).
327 // Returns false on failure. 327 // Returns false on failure.
328 static bool GetShortcutPath(ShellUtil::ShortcutLocation location, 328 static bool GetShortcutPath(ShellUtil::ShortcutLocation location,
329 BrowserDistribution* dist, 329 BrowserDistribution* dist,
330 ShellChange level, 330 ShellChange level,
331 base::FilePath* path); 331 base::FilePath* path);
332 332
333 // Move an existing shortcut from |old_location| to |new_location| for the
334 // set |shortcut_level|.
335 static bool ShellUtil::MoveExistingShortcut(
336 ShellUtil::ShellChange shortcut_level,
337 BrowserDistribution* dist,
338 const ShellUtil::ShortcutProperties& properties,
339 ShellUtil::ShortcutLocation old_location,
340 ShellUtil::ShortcutLocation new_location);
341
333 // Updates shortcut in |location| (or creates it if |options| specify 342 // Updates shortcut in |location| (or creates it if |options| specify
334 // SHELL_SHORTCUT_CREATE_ALWAYS). 343 // SHELL_SHORTCUT_CREATE_ALWAYS).
335 // |dist| gives the type of browser distribution currently in use. 344 // |dist| gives the type of browser distribution currently in use.
336 // |properties| and |operation| affect this method as described on their 345 // |properties| and |operation| affect this method as described on their
337 // invidividual definitions above. 346 // invidividual definitions above.
338 // |location| may be one of SHORTCUT_LOCATION_DESKTOP, 347 // |location| may be one of SHORTCUT_LOCATION_DESKTOP,
339 // SHORTCUT_LOCATION_QUICK_LAUNCH, SHORTCUT_LOCATION_START_MENU_ROOT, 348 // SHORTCUT_LOCATION_QUICK_LAUNCH, SHORTCUT_LOCATION_START_MENU_ROOT,
340 // SHORTCUT_LOCATION_START_MENU_CHROME_DIR, or 349 // SHORTCUT_LOCATION_START_MENU_CHROME_DIR, or
341 // SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR. 350 // SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR.
342 static bool CreateOrUpdateShortcut( 351 static bool CreateOrUpdateShortcut(
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // application, as given to AddFileAssociations. All information associated 656 // application, as given to AddFileAssociations. All information associated
648 // with this name will be deleted. 657 // with this name will be deleted.
649 static bool DeleteFileAssociations(const base::string16& prog_id); 658 static bool DeleteFileAssociations(const base::string16& prog_id);
650 659
651 private: 660 private:
652 DISALLOW_COPY_AND_ASSIGN(ShellUtil); 661 DISALLOW_COPY_AND_ASSIGN(ShellUtil);
653 }; 662 };
654 663
655 664
656 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 665 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698