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

Side by Side Diff: android_webview/browser/icon_helper.cc

Issue 14322023: Don't request missing favicon on every page request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync up to r199996 Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "android_webview/browser/icon_helper.h" 5 #include "android_webview/browser/icon_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 IconHelper::~IconHelper() { 25 IconHelper::~IconHelper() {
26 } 26 }
27 27
28 void IconHelper::SetListener(Listener* listener) { 28 void IconHelper::SetListener(Listener* listener) {
29 listener_ = listener; 29 listener_ = listener;
30 } 30 }
31 31
32 void IconHelper::DownloadFaviconCallback( 32 void IconHelper::DownloadFaviconCallback(
33 int id, const GURL& image_url, int requested_size, 33 int id, int http_status_code, const GURL& image_url, int requested_size,
34 const std::vector<SkBitmap>& bitmaps) { 34 const std::vector<SkBitmap>& bitmaps) {
35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
36 if (bitmaps.size() == 0) { 36 if (bitmaps.size() == 0) {
37 return; 37 return;
38 } 38 }
39 39
40 // We can protentially have multiple frames of the icon 40 // We can protentially have multiple frames of the icon
41 // in different sizes. We need more fine grain API spec 41 // in different sizes. We need more fine grain API spec
42 // to let clients pick out the frame they want. 42 // to let clients pick out the frame they want.
43 43
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Silently ignore it. Only trigger a callback on valid icons. 77 // Silently ignore it. Only trigger a callback on valid icons.
78 break; 78 break;
79 default: 79 default:
80 NOTREACHED(); 80 NOTREACHED();
81 break; 81 break;
82 } 82 }
83 } 83 }
84 } 84 }
85 85
86 } // namespace android_webview 86 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/icon_helper.h ('k') | chrome/browser/favicon/favicon_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698