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

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

Issue 1026113003: Don't send a SHChangeNotify for creating an app icon when creating a shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/web_applications/web_app_win.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/update_shortcut_worker_win.h" 5 #include "chrome/browser/web_applications/update_shortcut_worker_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Ensure web_app_path exists. web_app_path could be missing for a legacy 185 // Ensure web_app_path exists. web_app_path could be missing for a legacy
186 // shortcut created by Gears. 186 // shortcut created by Gears.
187 if (!base::PathExists(web_app_path) && 187 if (!base::PathExists(web_app_path) &&
188 !base::CreateDirectory(web_app_path)) { 188 !base::CreateDirectory(web_app_path)) {
189 NOTREACHED(); 189 NOTREACHED();
190 return; 190 return;
191 } 191 }
192 192
193 base::FilePath icon_file = 193 base::FilePath icon_file =
194 web_app::internals::GetIconFilePath(web_app_path, shortcut_info_.title); 194 web_app::internals::GetIconFilePath(web_app_path, shortcut_info_.title);
195 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info_.favicon); 195 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info_.favicon, true);
196 196
197 // Update existing shortcuts' description, icon and app id. 197 // Update existing shortcuts' description, icon and app id.
198 CheckExistingShortcuts(); 198 CheckExistingShortcuts();
199 if (!shortcut_files_.empty()) { 199 if (!shortcut_files_.empty()) {
200 // Generates app id from web app url and profile path. 200 // Generates app id from web app url and profile path.
201 base::string16 app_id = ShellIntegration::GetAppModelIdForProfile( 201 base::string16 app_id = ShellIntegration::GetAppModelIdForProfile(
202 base::UTF8ToWide( 202 base::UTF8ToWide(
203 web_app::GenerateApplicationNameFromURL(shortcut_info_.url)), 203 web_app::GenerateApplicationNameFromURL(shortcut_info_.url)),
204 profile_path_); 204 profile_path_);
205 205
(...skipping 29 matching lines...) Expand all
235 base::Unretained(this))); 235 base::Unretained(this)));
236 } 236 }
237 } 237 }
238 238
239 void UpdateShortcutWorker::DeleteMeOnUIThread() { 239 void UpdateShortcutWorker::DeleteMeOnUIThread() {
240 DCHECK_CURRENTLY_ON(BrowserThread::UI); 240 DCHECK_CURRENTLY_ON(BrowserThread::UI);
241 delete this; 241 delete this;
242 } 242 }
243 243
244 } // namespace web_app 244 } // namespace web_app
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/web_applications/web_app_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698