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

Side by Side Diff: chrome/browser/web_applications/web_app_win.cc

Issue 263403002: Replace OnceOffCreateShortcuts with UpdateShortcutsForAllAppsIfNeeded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check all extensions, not just enabled. Created 6 years, 6 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/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/file_util.h" 10 #include "base/file_util.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (ShellUtil::GetShortcutPath( 482 if (ShellUtil::GetShortcutPath(
483 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR, 483 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR,
484 BrowserDistribution::GetDistribution(), 484 BrowserDistribution::GetDistribution(),
485 ShellUtil::CURRENT_USER, 485 ShellUtil::CURRENT_USER,
486 &chrome_apps_dir)) { 486 &chrome_apps_dir)) {
487 if (base::IsDirectoryEmpty(chrome_apps_dir)) 487 if (base::IsDirectoryEmpty(chrome_apps_dir))
488 base::DeleteFile(chrome_apps_dir, false); 488 base::DeleteFile(chrome_apps_dir, false);
489 } 489 }
490 } 490 }
491 491
492 void UpdateShortcutsForAllAppsForProfile(const base::FilePath& profile_path,
493 const std::set<std::string>& app_ids) {
494 }
495
492 std::vector<base::FilePath> GetShortcutPaths( 496 std::vector<base::FilePath> GetShortcutPaths(
493 const ShortcutLocations& creation_locations) { 497 const ShortcutLocations& creation_locations) {
494 // Shortcut paths under which to create shortcuts. 498 // Shortcut paths under which to create shortcuts.
495 std::vector<base::FilePath> shortcut_paths; 499 std::vector<base::FilePath> shortcut_paths;
496 // Locations to add to shortcut_paths. 500 // Locations to add to shortcut_paths.
497 struct { 501 struct {
498 bool use_this_location; 502 bool use_this_location;
499 ShellUtil::ShortcutLocation location_id; 503 ShellUtil::ShortcutLocation location_id;
500 } locations[] = { 504 } locations[] = {
501 { 505 {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 552
549 } // namespace internals 553 } // namespace internals
550 554
551 void UpdateShortcutForTabContents(content::WebContents* web_contents) { 555 void UpdateShortcutForTabContents(content::WebContents* web_contents) {
552 // UpdateShortcutWorker will delete itself when it's done. 556 // UpdateShortcutWorker will delete itself when it's done.
553 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); 557 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents);
554 worker->Run(); 558 worker->Run();
555 } 559 }
556 560
557 } // namespace web_app 561 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698