| OLD | NEW |
| 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/web_applications/web_app_win.h" | 5 #include "chrome/browser/web_applications/web_app_win.h" |
| 6 | 6 |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // For Win7+, |in_quick_launch_bar| indicates that we are pinning to | 583 // For Win7+, |in_quick_launch_bar| indicates that we are pinning to |
| 584 // taskbar. This needs to be handled by callers. | 584 // taskbar. This needs to be handled by callers. |
| 585 creation_locations.in_quick_launch_bar && | 585 creation_locations.in_quick_launch_bar && |
| 586 base::win::CanPinShortcutToTaskbar(), | 586 base::win::CanPinShortcutToTaskbar(), |
| 587 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH | 587 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH |
| 588 } | 588 } |
| 589 }; | 589 }; |
| 590 | 590 |
| 591 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 591 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 592 // Populate shortcut_paths. | 592 // Populate shortcut_paths. |
| 593 for (int i = 0; i < arraysize(locations); ++i) { | 593 for (size_t i = 0; i < arraysize(locations); ++i) { |
| 594 if (locations[i].use_this_location) { | 594 if (locations[i].use_this_location) { |
| 595 base::FilePath path; | 595 base::FilePath path; |
| 596 if (!ShellUtil::GetShortcutPath(locations[i].location_id, | 596 if (!ShellUtil::GetShortcutPath(locations[i].location_id, |
| 597 dist, | 597 dist, |
| 598 ShellUtil::CURRENT_USER, | 598 ShellUtil::CURRENT_USER, |
| 599 &path)) { | 599 &path)) { |
| 600 NOTREACHED(); | 600 NOTREACHED(); |
| 601 continue; | 601 continue; |
| 602 } | 602 } |
| 603 shortcut_paths.push_back(path); | 603 shortcut_paths.push_back(path); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 614 | 614 |
| 615 } // namespace internals | 615 } // namespace internals |
| 616 | 616 |
| 617 void UpdateShortcutForTabContents(content::WebContents* web_contents) { | 617 void UpdateShortcutForTabContents(content::WebContents* web_contents) { |
| 618 // UpdateShortcutWorker will delete itself when it's done. | 618 // UpdateShortcutWorker will delete itself when it's done. |
| 619 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); | 619 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); |
| 620 worker->Run(); | 620 worker->Run(); |
| 621 } | 621 } |
| 622 | 622 |
| 623 } // namespace web_app | 623 } // namespace web_app |
| OLD | NEW |