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

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

Issue 934693002: Reload favicon from HTTP cache on Ctrl+Refresh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/chrome_tests.gypi » ('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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 UpdateShortcuts(); 82 UpdateShortcuts();
83 return; 83 return;
84 } 84 }
85 85
86 int preferred_size = std::max(unprocessed_icons_.back().width, 86 int preferred_size = std::max(unprocessed_icons_.back().width,
87 unprocessed_icons_.back().height); 87 unprocessed_icons_.back().height);
88 web_contents_->DownloadImage( 88 web_contents_->DownloadImage(
89 unprocessed_icons_.back().url, 89 unprocessed_icons_.back().url,
90 true, // favicon 90 true, // favicon
91 0, // no maximum size 91 0, // no maximum size
92 false, // normal cache policy
92 base::Bind(&UpdateShortcutWorker::DidDownloadFavicon, 93 base::Bind(&UpdateShortcutWorker::DidDownloadFavicon,
93 base::Unretained(this), 94 base::Unretained(this),
94 preferred_size)); 95 preferred_size));
95 unprocessed_icons_.pop_back(); 96 unprocessed_icons_.pop_back();
96 } 97 }
97 98
98 void UpdateShortcutWorker::DidDownloadFavicon( 99 void UpdateShortcutWorker::DidDownloadFavicon(
99 int requested_size, 100 int requested_size,
100 int id, 101 int id,
101 int http_status_code, 102 int http_status_code,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 base::Unretained(this))); 235 base::Unretained(this)));
235 } 236 }
236 } 237 }
237 238
238 void UpdateShortcutWorker::DeleteMeOnUIThread() { 239 void UpdateShortcutWorker::DeleteMeOnUIThread() {
239 DCHECK_CURRENTLY_ON(BrowserThread::UI); 240 DCHECK_CURRENTLY_ON(BrowserThread::UI);
240 delete this; 241 delete this;
241 } 242 }
242 243
243 } // namespace web_app 244 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698