summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 05:29:53 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 05:29:53 +0000
commit8790210c68de5ab29e54a46f761a7a8d60430334 (patch)
tree159098319252d715c174230adbeb88338a6f67e4 /extensions
parent05fd507a71a552edc3290adc35c45dfdc13d251a (diff)
downloadchromium_src-8790210c68de5ab29e54a46f761a7a8d60430334.zip
chromium_src-8790210c68de5ab29e54a46f761a7a8d60430334.tar.gz
chromium_src-8790210c68de5ab29e54a46f761a7a8d60430334.tar.bz2
Move EmptyString, kWhitespace and the BOM to base.
This moves EmptyString*, kWhitespace*, and the UTF 8 Byte Order Marker to the base:: namespace. Many of them just got changed to a default-constructed string when a reference was not required. I qualified some string16s with base:: when I was changing adjacent code. I need to do another pass to finish these up. BUG= TBR=sky@chromium.org Review URL: https://codereview.chromium.org/89243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r--extensions/browser/file_highlighter_unittest.cc14
-rw-r--r--extensions/common/manifest_handlers/csp_info.cc2
2 files changed, 8 insertions, 8 deletions
diff --git a/extensions/browser/file_highlighter_unittest.cc b/extensions/browser/file_highlighter_unittest.cc
index a449bf9..f419109 100644
--- a/extensions/browser/file_highlighter_unittest.cc
+++ b/extensions/browser/file_highlighter_unittest.cc
@@ -49,7 +49,7 @@ TEST(ManifestHighlighterUnitTest, ManifestHighlighterUnitTest) {
" /* This is a tricky comment because it has brackets }]*/\n"
" \"tabs\"\n"
" ]";
- ManifestHighlighter permissions(kManifest, "permissions", EmptyString());
+ ManifestHighlighter permissions(kManifest, "permissions", std::string());
EXPECT_EQ(kPermissionsFeature, permissions.GetFeature());
// Get a specific portion of a key.
@@ -70,14 +70,14 @@ TEST(ManifestHighlighterUnitTest, ManifestHighlighterUnitTest) {
EXPECT_EQ(kMatchesFeature, matches.GetFeature());
// If a feature isn't present, we should get an empty string.
- ManifestHighlighter not_present(kManifest, "a_fake_feature", EmptyString());
- EXPECT_EQ(EmptyString(), not_present.GetFeature());
+ ManifestHighlighter not_present(kManifest, "a_fake_feature", std::string());
+ EXPECT_EQ(std::string(), not_present.GetFeature());
// If we request a specific portion of a key which is not found, we should
// get an empty string.
ManifestHighlighter specific_portion_not_present(
kManifest, "permissions", "a_fake_feature");
- EXPECT_EQ(EmptyString(), specific_portion_not_present.GetFeature());
+ EXPECT_EQ(std::string(), specific_portion_not_present.GetFeature());
const char kEscapedQuotedFeature[] = "\"escaped_quoted\\\"\"";
ManifestHighlighter escaped_quoted(
@@ -91,7 +91,7 @@ TEST(ManifestHighlighterUnitTest, ManifestHighlighterUnitTest) {
// Check with non-ascii characters.
const char kInternationalFeature[] = "\"international_key\": \"還是不要\"";
ManifestHighlighter international_feature(
- kManifest, "international_key", EmptyString());
+ kManifest, "international_key", std::string());
EXPECT_EQ(kInternationalFeature, international_feature.GetFeature());
}
@@ -111,10 +111,10 @@ TEST(SouceHighlighterUnitTest, SourceHighlighterUnitTest) {
EXPECT_EQ(kNoNewlineSourceFile, full_line.GetFeature());
SourceHighlighter line_zero(kNoNewlineSourceFile, 0u);
- EXPECT_EQ(EmptyString(), line_zero.GetFeature());
+ EXPECT_EQ(std::string(), line_zero.GetFeature());
SourceHighlighter out_of_bounds(kNoNewlineSourceFile, 2u);
- EXPECT_EQ(EmptyString(), out_of_bounds.GetFeature());
+ EXPECT_EQ(std::string(), out_of_bounds.GetFeature());
}
} // namespace extensions
diff --git a/extensions/common/manifest_handlers/csp_info.cc b/extensions/common/manifest_handlers/csp_info.cc
index 65e3e9b..79f531a 100644
--- a/extensions/common/manifest_handlers/csp_info.cc
+++ b/extensions/common/manifest_handlers/csp_info.cc
@@ -58,7 +58,7 @@ const std::string& CSPInfo::GetContentSecurityPolicy(
const Extension* extension) {
CSPInfo* csp_info = static_cast<CSPInfo*>(
extension->GetManifestData(keys::kContentSecurityPolicy));
- return csp_info ? csp_info->content_security_policy : EmptyString();
+ return csp_info ? csp_info->content_security_policy : base::EmptyString();
}
// static