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

Side by Side Diff: chrome/browser/search/thumbnail_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
« no previous file with comments | « chrome/browser/search/iframe_source.cc ('k') | chrome/browser/search/thumbnail_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SEARCH_THUMBNAIL_SOURCE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_
6 #define CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_ 6 #define CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 // content::URLDataSource implementation. 42 // content::URLDataSource implementation.
43 std::string GetSource() const override; 43 std::string GetSource() const override;
44 void StartDataRequest( 44 void StartDataRequest(
45 const std::string& path, 45 const std::string& path,
46 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 46 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
47 const content::URLDataSource::GotDataCallback& callback) override; 47 const content::URLDataSource::GotDataCallback& callback) override;
48 std::string GetMimeType(const std::string& path) const override; 48 std::string GetMimeType(const std::string& path) const override;
49 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath( 49 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath(
50 const std::string& path) const override; 50 const std::string& path) const override;
51 bool AllowCaching() const override;
51 bool ShouldServiceRequest(const net::URLRequest* request) const override; 52 bool ShouldServiceRequest(const net::URLRequest* request) const override;
52 53
53 // Extracts the |page_url| (e.g. cnn.com) and the |fallback_thumbnail_url| 54 // Extracts the |page_url| (e.g. cnn.com) and the |fallback_thumbnail_url|
54 // fetchable from the server, if present, from the |path|. Visible for 55 // fetchable from the server, if present, from the |path|. Visible for
55 // testing. 56 // testing.
56 void ExtractPageAndThumbnailUrls(const std::string& path, 57 void ExtractPageAndThumbnailUrls(const std::string& path,
57 GURL* page_url, 58 GURL* page_url,
58 GURL* fallback_thumbnail_url); 59 GURL* fallback_thumbnail_url);
59 60
60 private: 61 private:
(...skipping 23 matching lines...) Expand all
84 // existing thumbnails in the database that contain a URL matching the prefix 85 // existing thumbnails in the database that contain a URL matching the prefix
85 // of the requested URL. 86 // of the requested URL.
86 const bool capture_thumbnails_; 87 const bool capture_thumbnails_;
87 88
88 base::WeakPtrFactory<ThumbnailSource> weak_ptr_factory_; 89 base::WeakPtrFactory<ThumbnailSource> weak_ptr_factory_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(ThumbnailSource); 91 DISALLOW_COPY_AND_ASSIGN(ThumbnailSource);
91 }; 92 };
92 93
93 #endif // CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_ 94 #endif // CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/iframe_source.cc ('k') | chrome/browser/search/thumbnail_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698