OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |