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

Side by Side Diff: chrome/browser/search/local_ntp_source.h

Issue 2533203002: New Tab Page: chrome-search://local-ntp/ files should not be cachable (Closed)
Patch Set: comment Created 4 years 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 | « no previous file | chrome/browser/search/local_ntp_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
6 #define CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ 6 #define CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/browser/url_data_source.h" 10 #include "content/public/browser/url_data_source.h"
11 11
12 class Profile; 12 class Profile;
13 13
14 // Serves HTML and resources for the local new tab page i.e. 14 // Serves HTML and resources for the local new tab page i.e.
15 // chrome-search://local-ntp/local-ntp.html 15 // chrome-search://local-ntp/local-ntp.html
16 class LocalNtpSource : public content::URLDataSource { 16 class LocalNtpSource : public content::URLDataSource {
17 public: 17 public:
18 explicit LocalNtpSource(Profile* profile); 18 explicit LocalNtpSource(Profile* profile);
19 19
20 private: 20 private:
21 ~LocalNtpSource() override; 21 ~LocalNtpSource() override;
22 22
23 // Overridden from content::URLDataSource: 23 // Overridden from content::URLDataSource:
24 std::string GetSource() const override; 24 std::string GetSource() const override;
25 void StartDataRequest( 25 void StartDataRequest(
26 const std::string& path, 26 const std::string& path,
27 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 27 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
28 const content::URLDataSource::GotDataCallback& callback) override; 28 const content::URLDataSource::GotDataCallback& callback) override;
29 std::string GetMimeType(const std::string& path) const override; 29 std::string GetMimeType(const std::string& path) const override;
30 bool AllowCaching() const override;
30 bool ShouldServiceRequest(const net::URLRequest* request) const override; 31 bool ShouldServiceRequest(const net::URLRequest* request) const override;
31 std::string GetContentSecurityPolicyChildSrc() const override; 32 std::string GetContentSecurityPolicyChildSrc() const override;
32 33
33 Profile* profile_; 34 Profile* profile_;
34 35
35 DISALLOW_COPY_AND_ASSIGN(LocalNtpSource); 36 DISALLOW_COPY_AND_ASSIGN(LocalNtpSource);
36 }; 37 };
37 38
38 #endif // CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ 39 #endif // CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search/local_ntp_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698