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

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: Address comments 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
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 void UpdateRelaunchDetailsForApp(Profile* profile, 407 void UpdateRelaunchDetailsForApp(Profile* profile,
408 const extensions::Extension* extension, 408 const extensions::Extension* extension,
409 HWND hwnd) { 409 HWND hwnd) {
410 web_app::UpdateShortcutInfoAndIconForApp( 410 web_app::UpdateShortcutInfoAndIconForApp(
411 extension, 411 extension,
412 profile, 412 profile,
413 base::Bind(&OnShortcutInfoLoadedForSetRelaunchDetails, hwnd)); 413 base::Bind(&OnShortcutInfoLoadedForSetRelaunchDetails, hwnd));
414 } 414 }
415 415
416 void UpdateShortcutsForAllApps(Profile* profile,
417 const base::Closure& callback) {
418 callback.Run();
419 }
420
416 namespace internals { 421 namespace internals {
417 422
418 // Saves |image| to |icon_file| if the file is outdated and refresh shell's 423 // Saves |image| to |icon_file| if the file is outdated and refresh shell's
419 // icon cache to ensure correct icon is displayed. Returns true if icon_file 424 // icon cache to ensure correct icon is displayed. Returns true if icon_file
420 // is up to date or successfully updated. 425 // is up to date or successfully updated.
421 bool CheckAndSaveIcon(const base::FilePath& icon_file, 426 bool CheckAndSaveIcon(const base::FilePath& icon_file,
422 const gfx::ImageFamily& image) { 427 const gfx::ImageFamily& image) {
423 if (ShouldUpdateIcon(icon_file, image)) { 428 if (ShouldUpdateIcon(icon_file, image)) {
424 if (SaveIconWithCheckSum(icon_file, image)) { 429 if (SaveIconWithCheckSum(icon_file, image)) {
425 // Refresh shell's icon cache. This call is quite disruptive as user would 430 // Refresh shell's icon cache. This call is quite disruptive as user would
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 615
611 } // namespace internals 616 } // namespace internals
612 617
613 void UpdateShortcutForTabContents(content::WebContents* web_contents) { 618 void UpdateShortcutForTabContents(content::WebContents* web_contents) {
614 // UpdateShortcutWorker will delete itself when it's done. 619 // UpdateShortcutWorker will delete itself when it's done.
615 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); 620 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents);
616 worker->Run(); 621 worker->Run();
617 } 622 }
618 623
619 } // namespace web_app 624 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698