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

Side by Side Diff: chrome/common/extensions/csp_validator.cc

Issue 10909239: Rename PACKAGED_APP references to LEGACY_PACKAGED_APP (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments Created 8 years, 2 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 "chrome/common/extensions/csp_validator.h" 5 #include "chrome/common/extensions/csp_validator.h"
6 6
7 #include "base/string_split.h" 7 #include "base/string_split.h"
8 #include "base/string_tokenizer.h" 8 #include "base/string_tokenizer.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 StartsWithASCII(source, "http://localhost:", false) || 54 StartsWithASCII(source, "http://localhost:", false) ||
55 StartsWithASCII(source, "https://", true) || 55 StartsWithASCII(source, "https://", true) ||
56 StartsWithASCII(source, "chrome://", true) || 56 StartsWithASCII(source, "chrome://", true) ||
57 StartsWithASCII(source, "chrome-extension://", true) || 57 StartsWithASCII(source, "chrome-extension://", true) ||
58 StartsWithASCII(source, "chrome-extension-resource:", true)) { 58 StartsWithASCII(source, "chrome-extension-resource:", true)) {
59 continue; 59 continue;
60 } 60 }
61 61
62 // crbug.com/146487 62 // crbug.com/146487
63 if (type == Extension::TYPE_EXTENSION || 63 if (type == Extension::TYPE_EXTENSION ||
64 type == Extension::TYPE_PACKAGED_APP) { 64 type == Extension::TYPE_LEGACY_PACKAGED_APP) {
65 if (source == "'unsafe-eval'") 65 if (source == "'unsafe-eval'")
66 continue; 66 continue;
67 } 67 }
68 68
69 return false; 69 return false;
70 } 70 }
71 71
72 return true; // Empty values default to 'none', which is secure. 72 return true; // Empty values default to 'none', which is secure.
73 } 73 }
74 74
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 } 178 }
179 } 179 }
180 180
181 return seen_sandbox; 181 return seen_sandbox;
182 } 182 }
183 183
184 } // csp_validator 184 } // csp_validator
185 185
186 } // extensions 186 } // extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698