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

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

Issue 2931983002: Mojo JS bindings: specify compress="gzip" for bindings JS files in .grd. (Closed)
Patch Set: . Created 3 years, 6 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) 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 #include "content/browser/webui/shared_resources_data_source.h" 5 #include "content/browser/webui/shared_resources_data_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // back. 189 // back.
190 std::string allowed_origin_prefix = kChromeUIScheme; 190 std::string allowed_origin_prefix = kChromeUIScheme;
191 allowed_origin_prefix += "://"; 191 allowed_origin_prefix += "://";
192 if (!base::StartsWith(origin, allowed_origin_prefix, 192 if (!base::StartsWith(origin, allowed_origin_prefix,
193 base::CompareCase::SENSITIVE)) { 193 base::CompareCase::SENSITIVE)) {
194 return "null"; 194 return "null";
195 } 195 }
196 return origin; 196 return origin;
197 } 197 }
198 198
199 bool SharedResourcesDataSource::IsGzipped(const std::string& path) const {
200 return path == "js/mojo_bindings.js";
201 }
202
199 } // namespace content 203 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/shared_resources_data_source.h ('k') | ui/webui/resources/webui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698