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

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

Issue 2634413002: Faster Reload: Specify AllowCaching = false for some URLDataSources that need it (Closed)
Patch Set: Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_LARGE_ICON_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 ~LargeIconSource() override; 45 ~LargeIconSource() override;
46 46
47 // content::URLDataSource implementation. 47 // content::URLDataSource implementation.
48 std::string GetSource() const override; 48 std::string GetSource() const override;
49 void StartDataRequest( 49 void StartDataRequest(
50 const std::string& path, 50 const std::string& path,
51 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 51 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
52 const content::URLDataSource::GotDataCallback& callback) override; 52 const content::URLDataSource::GotDataCallback& callback) override;
53 std::string GetMimeType(const std::string&) const override; 53 std::string GetMimeType(const std::string&) const override;
54 bool AllowCaching() const override;
54 bool ShouldReplaceExistingSource() const override; 55 bool ShouldReplaceExistingSource() const override;
55 bool ShouldServiceRequest(const net::URLRequest* request) const override; 56 bool ShouldServiceRequest(const net::URLRequest* request) const override;
56 57
57 private: 58 private:
58 // Called with results of large icon retrieval request. 59 // Called with results of large icon retrieval request.
59 void OnLargeIconDataAvailable( 60 void OnLargeIconDataAvailable(
60 const content::URLDataSource::GotDataCallback& callback, 61 const content::URLDataSource::GotDataCallback& callback,
61 const GURL& url, 62 const GURL& url,
62 int size, 63 int size,
63 const favicon_base::LargeIconResult& bitmap_result); 64 const favicon_base::LargeIconResult& bitmap_result);
64 65
65 // Returns null to trigger "Not Found" response. 66 // Returns null to trigger "Not Found" response.
66 void SendNotFoundResponse( 67 void SendNotFoundResponse(
67 const content::URLDataSource::GotDataCallback& callback); 68 const content::URLDataSource::GotDataCallback& callback);
68 69
69 base::CancelableTaskTracker cancelable_task_tracker_; 70 base::CancelableTaskTracker cancelable_task_tracker_;
70 71
71 // Owned by client. 72 // Owned by client.
72 favicon::FallbackIconService* fallback_icon_service_; 73 favicon::FallbackIconService* fallback_icon_service_;
73 74
74 // Owned by client. 75 // Owned by client.
75 favicon::LargeIconService* large_icon_service_; 76 favicon::LargeIconService* large_icon_service_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(LargeIconSource); 78 DISALLOW_COPY_AND_ASSIGN(LargeIconSource);
78 }; 79 };
79 80
80 #endif // CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_ 81 #endif // CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/browser/ui/webui/large_icon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698