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

Side by Side Diff: content/browser/webui/shared_resources_data_source.h

Issue 2774263002: Specify AllowCaching = false for dynamically-generated contents (Closed)
Patch Set: typo Created 3 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
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 #ifndef CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ 5 #ifndef CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_
6 #define CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ 6 #define CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_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 namespace content { 12 namespace content {
13 13
14 // A DataSource for chrome://resources/ URLs. 14 // A DataSource for chrome://resources/ URLs.
15 class SharedResourcesDataSource : public URLDataSource { 15 class SharedResourcesDataSource : public URLDataSource {
16 public: 16 public:
17 SharedResourcesDataSource(); 17 SharedResourcesDataSource();
18 18
19 // URLDataSource implementation. 19 // URLDataSource implementation.
20 std::string GetSource() const override; 20 std::string GetSource() const override;
21 void StartDataRequest( 21 void StartDataRequest(
22 const std::string& path, 22 const std::string& path,
23 const ResourceRequestInfo::WebContentsGetter& wc_getter, 23 const ResourceRequestInfo::WebContentsGetter& wc_getter,
24 const URLDataSource::GotDataCallback& callback) override; 24 const URLDataSource::GotDataCallback& callback) override;
25 bool AllowCaching() const override;
25 std::string GetMimeType(const std::string& path) const override; 26 std::string GetMimeType(const std::string& path) const override;
26 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath( 27 scoped_refptr<base::SingleThreadTaskRunner> TaskRunnerForRequestPath(
27 const std::string& path) const override; 28 const std::string& path) const override;
28 std::string GetAccessControlAllowOriginForOrigin( 29 std::string GetAccessControlAllowOriginForOrigin(
29 const std::string& origin) const override; 30 const std::string& origin) const override;
30 31
31 private: 32 private:
32 ~SharedResourcesDataSource() override; 33 ~SharedResourcesDataSource() override;
33 34
34 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); 35 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource);
35 }; 36 };
36 37
37 } // namespace content 38 } // namespace content
38 39
39 #endif // CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ 40 #endif // CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | content/browser/webui/shared_resources_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698