OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" | 5 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 std::string AppLauncherPageUI::HTMLSource::GetMimeType( | 120 std::string AppLauncherPageUI::HTMLSource::GetMimeType( |
121 const std::string& resource) const { | 121 const std::string& resource) const { |
122 return "text/html"; | 122 return "text/html"; |
123 } | 123 } |
124 | 124 |
125 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const { | 125 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const { |
126 return false; | 126 return false; |
127 } | 127 } |
128 | 128 |
| 129 bool AppLauncherPageUI::HTMLSource::AllowCaching() const { |
| 130 // Should not be cached to reflect dynamically-generated contents that may |
| 131 // depend on user profiles. |
| 132 return false; |
| 133 } |
| 134 |
129 std::string AppLauncherPageUI::HTMLSource::GetContentSecurityPolicyScriptSrc() | 135 std::string AppLauncherPageUI::HTMLSource::GetContentSecurityPolicyScriptSrc() |
130 const { | 136 const { |
131 // 'unsafe-inline' is added to script-src. | 137 // 'unsafe-inline' is added to script-src. |
132 return "script-src chrome://resources 'self' 'unsafe-eval' 'unsafe-inline';"; | 138 return "script-src chrome://resources 'self' 'unsafe-eval' 'unsafe-inline';"; |
133 } | 139 } |
134 | 140 |
135 std::string AppLauncherPageUI::HTMLSource::GetContentSecurityPolicyStyleSrc() | 141 std::string AppLauncherPageUI::HTMLSource::GetContentSecurityPolicyStyleSrc() |
136 const { | 142 const { |
137 return "style-src 'self' chrome://resources chrome://theme 'unsafe-inline';"; | 143 return "style-src 'self' chrome://resources chrome://theme 'unsafe-inline';"; |
138 } | 144 } |
139 | 145 |
140 std::string AppLauncherPageUI::HTMLSource::GetContentSecurityPolicyImgSrc() | 146 std::string AppLauncherPageUI::HTMLSource::GetContentSecurityPolicyImgSrc() |
141 const { | 147 const { |
142 return "img-src chrome://extension-icon chrome://theme chrome://resources " | 148 return "img-src chrome://extension-icon chrome://theme chrome://resources " |
143 "data:;"; | 149 "data:;"; |
144 } | 150 } |
145 | 151 |
146 AppLauncherPageUI::HTMLSource::~HTMLSource() {} | 152 AppLauncherPageUI::HTMLSource::~HTMLSource() {} |
OLD | NEW |