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

Side by Side Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extension_web_ui.h" 5 #include "chrome/browser/extensions/extension_web_ui.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/base/file_stream.h" 10 #include "net/base/file_stream.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 private: 99 private:
100 ~ExtensionWebUIImageLoadingTracker() {} 100 ~ExtensionWebUIImageLoadingTracker() {}
101 101
102 // Forwards the result on the request. If no favicon was available then 102 // Forwards the result on the request. If no favicon was available then
103 // |icon_data| may be backed by NULL. Once the result has been forwarded the 103 // |icon_data| may be backed by NULL. Once the result has been forwarded the
104 // instance is deleted. 104 // instance is deleted.
105 void ForwardResult(scoped_refptr<RefCountedMemory> icon_data) { 105 void ForwardResult(scoped_refptr<RefCountedMemory> icon_data) {
106 bool know_icon = icon_data.get() != NULL && icon_data->size() > 0; 106 bool know_icon = icon_data.get() != NULL && icon_data->size() > 0;
107 request_->ForwardResultAsync( 107 request_->ForwardResultAsync(
108 FaviconService::FaviconDataCallback::TupleType(request_->handle(), 108 FaviconService::FaviconDataCallback::TupleType(request_->handle(),
109 know_icon, icon_data, false, GURL())); 109 know_icon, icon_data, false, GURL(), history::FAV_ICON));
110 delete this; 110 delete this;
111 } 111 }
112 112
113 ImageLoadingTracker tracker_; 113 ImageLoadingTracker tracker_;
114 scoped_refptr<FaviconService::GetFaviconRequest> request_; 114 scoped_refptr<FaviconService::GetFaviconRequest> request_;
115 const Extension* extension_; 115 const Extension* extension_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIImageLoadingTracker); 117 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIImageLoadingTracker);
118 }; 118 };
119 119
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } 400 }
401 401
402 // static 402 // static
403 void ExtensionWebUI::GetFaviconForURL(Profile* profile, 403 void ExtensionWebUI::GetFaviconForURL(Profile* profile,
404 FaviconService::GetFaviconRequest* request, const GURL& page_url) { 404 FaviconService::GetFaviconRequest* request, const GURL& page_url) {
405 // tracker deletes itself when done. 405 // tracker deletes itself when done.
406 ExtensionWebUIImageLoadingTracker* tracker = 406 ExtensionWebUIImageLoadingTracker* tracker =
407 new ExtensionWebUIImageLoadingTracker(profile, request, page_url); 407 new ExtensionWebUIImageLoadingTracker(profile, request, page_url);
408 tracker->Init(); 408 tracker->Init();
409 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698