OLD | NEW |
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> |
| 8 |
7 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
8 #include "base/logging.h" | 10 #include "base/logging.h" |
9 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
10 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
12 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
13 #include "content/public/common/content_client.h" | 15 #include "content/public/common/content_client.h" |
14 #include "content/public/common/url_constants.h" | 16 #include "content/public/common/url_constants.h" |
15 #include "net/base/mime_util.h" | 17 #include "net/base/mime_util.h" |
16 #include "ui/base/layout.h" | 18 #include "ui/base/layout.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // wildcards, so we need to set its value explicitly by passing the |origin| | 118 // wildcards, so we need to set its value explicitly by passing the |origin| |
117 // back. | 119 // back. |
118 std::string allowed_origin_prefix = kChromeUIScheme; | 120 std::string allowed_origin_prefix = kChromeUIScheme; |
119 allowed_origin_prefix += "://"; | 121 allowed_origin_prefix += "://"; |
120 if (origin.find(allowed_origin_prefix) != 0) | 122 if (origin.find(allowed_origin_prefix) != 0) |
121 return "null"; | 123 return "null"; |
122 return origin; | 124 return origin; |
123 } | 125 } |
124 | 126 |
125 } // namespace content | 127 } // namespace content |
OLD | NEW |