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

Side by Side Diff: chrome/browser/ui/webui/favicon_source.h

Issue 2856093004: Generalize content::URLDataSource so that it can be used by the network service. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // content::URLDataSource implementation. 62 // content::URLDataSource implementation.
63 std::string GetSource() const override; 63 std::string GetSource() const override;
64 void StartDataRequest( 64 void StartDataRequest(
65 const std::string& path, 65 const std::string& path,
66 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 66 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
67 const content::URLDataSource::GotDataCallback& callback) override; 67 const content::URLDataSource::GotDataCallback& callback) override;
68 std::string GetMimeType(const std::string&) const override; 68 std::string GetMimeType(const std::string&) const override;
69 bool AllowCaching() const override; 69 bool AllowCaching() const override;
70 bool ShouldReplaceExistingSource() const override; 70 bool ShouldReplaceExistingSource() const override;
71 bool ShouldServiceRequest(const net::URLRequest* request) const override; 71 bool ShouldServiceRequest(const GURL& url,
72 content::ResourceContext* resource_context,
73 int render_process_id) const override;
72 74
73 protected: 75 protected:
74 struct IconRequest { 76 struct IconRequest {
75 IconRequest(); 77 IconRequest();
76 IconRequest(const content::URLDataSource::GotDataCallback& cb, 78 IconRequest(const content::URLDataSource::GotDataCallback& cb,
77 const GURL& path, 79 const GURL& path,
78 int size, 80 int size,
79 float scale); 81 float scale);
80 IconRequest(const IconRequest& other); 82 IconRequest(const IconRequest& other);
81 ~IconRequest(); 83 ~IconRequest();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 119
118 base::CancelableTaskTracker cancelable_task_tracker_; 120 base::CancelableTaskTracker cancelable_task_tracker_;
119 121
120 // The favicon_base::IconTypes of icon that this FaviconSource handles. 122 // The favicon_base::IconTypes of icon that this FaviconSource handles.
121 int icon_types_; 123 int icon_types_;
122 124
123 DISALLOW_COPY_AND_ASSIGN(FaviconSource); 125 DISALLOW_COPY_AND_ASSIGN(FaviconSource);
124 }; 126 };
125 127
126 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 128 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698