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

Unified Diff: chrome/common/extensions/csp_validator.cc

Issue 12087091: Move string tokenizer to base/strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/auto_start_linux.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/csp_validator.cc
diff --git a/chrome/common/extensions/csp_validator.cc b/chrome/common/extensions/csp_validator.cc
index 814026ca4d79ff0cf101045b25e03d6a4bb028ca..e6a7677efa2fb0601ca55aefcdc92fcc4f77e7f9 100644
--- a/chrome/common/extensions/csp_validator.cc
+++ b/chrome/common/extensions/csp_validator.cc
@@ -5,8 +5,8 @@
#include "chrome/common/extensions/csp_validator.h"
#include "base/string_split.h"
-#include "base/string_tokenizer.h"
#include "base/string_util.h"
+#include "base/strings/string_tokenizer.h"
namespace extensions {
@@ -35,7 +35,8 @@ struct DirectiveStatus {
bool is_secure;
};
-bool HasOnlySecureTokens(StringTokenizer& tokenizer, Manifest::Type type) {
+bool HasOnlySecureTokens(base::StringTokenizer& tokenizer,
+ Manifest::Type type) {
while (tokenizer.GetNext()) {
std::string source = tokenizer.token();
StringToLowerASCII(&source);
@@ -89,7 +90,7 @@ bool HasOnlySecureTokens(StringTokenizer& tokenizer, Manifest::Type type) {
// Returns true if |directive_name| matches |status.directive_name|.
bool UpdateStatus(const std::string& directive_name,
- StringTokenizer& tokenizer,
+ base::StringTokenizer& tokenizer,
DirectiveStatus* status,
Manifest::Type type) {
if (status->seen_in_policy)
@@ -124,7 +125,7 @@ bool ContentSecurityPolicyIsSecure(const std::string& policy,
for (size_t i = 0; i < directives.size(); ++i) {
std::string& input = directives[i];
- StringTokenizer tokenizer(input, " \t\r\n");
+ base::StringTokenizer tokenizer(input, " \t\r\n");
if (!tokenizer.GetNext())
continue;
@@ -164,7 +165,7 @@ bool ContentSecurityPolicyIsSandboxed(
for (size_t i = 0; i < directives.size(); ++i) {
std::string& input = directives[i];
- StringTokenizer tokenizer(input, " \t\r\n");
+ base::StringTokenizer tokenizer(input, " \t\r\n");
if (!tokenizer.GetNext())
continue;
« no previous file with comments | « chrome/common/auto_start_linux.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698