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

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: address comments 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
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,
196 true);
196 197
197 // Update existing shortcuts' description, icon and app id. 198 // Update existing shortcuts' description, icon and app id.
198 CheckExistingShortcuts(); 199 CheckExistingShortcuts();
199 if (!shortcut_files_.empty()) { 200 if (!shortcut_files_.empty()) {
200 // Generates app id from web app url and profile path. 201 // Generates app id from web app url and profile path.
201 base::string16 app_id = ShellIntegration::GetAppModelIdForProfile( 202 base::string16 app_id = ShellIntegration::GetAppModelIdForProfile(
202 base::UTF8ToWide( 203 base::UTF8ToWide(
203 web_app::GenerateApplicationNameFromURL(shortcut_info_.url)), 204 web_app::GenerateApplicationNameFromURL(shortcut_info_.url)),
204 profile_path_); 205 profile_path_);
205 206
(...skipping 29 matching lines...) Expand all
235 base::Unretained(this))); 236 base::Unretained(this)));
236 } 237 }
237 } 238 }
238 239
239 void UpdateShortcutWorker::DeleteMeOnUIThread() { 240 void UpdateShortcutWorker::DeleteMeOnUIThread() {
240 DCHECK_CURRENTLY_ON(BrowserThread::UI); 241 DCHECK_CURRENTLY_ON(BrowserThread::UI);
241 delete this; 242 delete this;
242 } 243 }
243 244
244 } // namespace web_app 245 } // namespace web_app
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/web_applications/web_app_win.h » ('j') | chrome/browser/web_applications/web_app_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698