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

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

Issue 10836247: Refactor ShellUtil shortcut code -- single multi-purpose methods as opposed to many slighlty diffe… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adress comments about shell_util interface Created 8 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 | 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/shell_integration.h" 5 #include "chrome/browser/shell_integration.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shobjidl.h> 8 #include <shobjidl.h>
9 #include <propkey.h> 9 #include <propkey.h>
10 #include <propvarutil.h> 10 #include <propvarutil.h>
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // Check both the common and the per-user Start Menu folders for system-level 601 // Check both the common and the per-user Start Menu folders for system-level
602 // installs. 602 // installs.
603 size_t folder = 603 size_t folder =
604 InstallUtil::IsPerUserInstall(chrome_exe.value().c_str()) ? 1 : 0; 604 InstallUtil::IsPerUserInstall(chrome_exe.value().c_str()) ? 1 : 0;
605 for (; folder < arraysize(kFolderIds); ++folder) { 605 for (; folder < arraysize(kFolderIds); ++folder) {
606 if (!PathService::Get(kFolderIds[folder], &shortcut)) { 606 if (!PathService::Get(kFolderIds[folder], &shortcut)) {
607 NOTREACHED(); 607 NOTREACHED();
608 continue; 608 continue;
609 } 609 }
610 610
611 shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + L".lnk"); 611 shortcut = shortcut.Append(shortcut_name).Append(shortcut_name +
612 installer::kLnkExt);
612 if (file_util::PathExists(shortcut)) 613 if (file_util::PathExists(shortcut))
613 return shortcut; 614 return shortcut;
614 } 615 }
615 616
616 return FilePath(); 617 return FilePath();
617 } 618 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698