summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 23:31:50 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 23:31:50 +0000
commite3a87d33face039a7445e4262e00c7c00ab4c725 (patch)
tree26804041c2a078797736208e83514332aa478c7e /chrome
parent432e5580710592e47169679d5c2cb569904c015a (diff)
downloadchromium_src-e3a87d33face039a7445e4262e00c7c00ab4c725.zip
chromium_src-e3a87d33face039a7445e4262e00c7c00ab4c725.tar.gz
chromium_src-e3a87d33face039a7445e4262e00c7c00ab4c725.tar.bz2
Convert wide strings in extension_cookies_api_constants.
BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3171007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55961 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_cookies_api_constants.cc30
-rw-r--r--chrome/browser/extensions/extension_cookies_api_constants.h30
-rw-r--r--chrome/browser/extensions/extension_cookies_helpers.cc15
-rw-r--r--chrome/browser/extensions/extension_cookies_helpers.h4
4 files changed, 39 insertions, 40 deletions
diff --git a/chrome/browser/extensions/extension_cookies_api_constants.cc b/chrome/browser/extensions/extension_cookies_api_constants.cc
index 1524d36..6307079 100644
--- a/chrome/browser/extensions/extension_cookies_api_constants.cc
+++ b/chrome/browser/extensions/extension_cookies_api_constants.cc
@@ -6,21 +6,21 @@
namespace extension_cookies_api_constants {
-const wchar_t kCookieKey[] = L"cookie";
-const wchar_t kDomainKey[] = L"domain";
-const wchar_t kExpirationDateKey[] = L"expirationDate";
-const wchar_t kHostOnlyKey[] = L"hostOnly";
-const wchar_t kHttpOnlyKey[] = L"httpOnly";
-const wchar_t kIdKey[] = L"id";
-const wchar_t kNameKey[] = L"name";
-const wchar_t kPathKey[] = L"path";
-const wchar_t kRemovedKey[] = L"removed";
-const wchar_t kSecureKey[] = L"secure";
-const wchar_t kSessionKey[] = L"session";
-const wchar_t kStoreIdKey[] = L"storeId";
-const wchar_t kTabIdsKey[] = L"tabIds";
-const wchar_t kUrlKey[] = L"url";
-const wchar_t kValueKey[] = L"value";
+const char kCookieKey[] = "cookie";
+const char kDomainKey[] = "domain";
+const char kExpirationDateKey[] = "expirationDate";
+const char kHostOnlyKey[] = "hostOnly";
+const char kHttpOnlyKey[] = "httpOnly";
+const char kIdKey[] = "id";
+const char kNameKey[] = "name";
+const char kPathKey[] = "path";
+const char kRemovedKey[] = "removed";
+const char kSecureKey[] = "secure";
+const char kSessionKey[] = "session";
+const char kStoreIdKey[] = "storeId";
+const char kTabIdsKey[] = "tabIds";
+const char kUrlKey[] = "url";
+const char kValueKey[] = "value";
const char kOnChanged[] = "cookies.onChanged";
diff --git a/chrome/browser/extensions/extension_cookies_api_constants.h b/chrome/browser/extensions/extension_cookies_api_constants.h
index 47d651f..04b8035 100644
--- a/chrome/browser/extensions/extension_cookies_api_constants.h
+++ b/chrome/browser/extensions/extension_cookies_api_constants.h
@@ -11,21 +11,21 @@
namespace extension_cookies_api_constants {
// Keys.
-extern const wchar_t kCookieKey[];
-extern const wchar_t kDomainKey[];
-extern const wchar_t kExpirationDateKey[];
-extern const wchar_t kHostOnlyKey[];
-extern const wchar_t kHttpOnlyKey[];
-extern const wchar_t kIdKey[];
-extern const wchar_t kNameKey[];
-extern const wchar_t kPathKey[];
-extern const wchar_t kRemovedKey[];
-extern const wchar_t kSecureKey[];
-extern const wchar_t kSessionKey[];
-extern const wchar_t kStoreIdKey[];
-extern const wchar_t kTabIdsKey[];
-extern const wchar_t kUrlKey[];
-extern const wchar_t kValueKey[];
+extern const char kCookieKey[];
+extern const char kDomainKey[];
+extern const char kExpirationDateKey[];
+extern const char kHostOnlyKey[];
+extern const char kHttpOnlyKey[];
+extern const char kIdKey[];
+extern const char kNameKey[];
+extern const char kPathKey[];
+extern const char kRemovedKey[];
+extern const char kSecureKey[];
+extern const char kSessionKey[];
+extern const char kStoreIdKey[];
+extern const char kTabIdsKey[];
+extern const char kUrlKey[];
+extern const char kValueKey[];
// Events.
extern const char kOnChanged[];
diff --git a/chrome/browser/extensions/extension_cookies_helpers.cc b/chrome/browser/extensions/extension_cookies_helpers.cc
index 3da90e7..2aedb5f 100644
--- a/chrome/browser/extensions/extension_cookies_helpers.cc
+++ b/chrome/browser/extensions/extension_cookies_helpers.cc
@@ -129,15 +129,14 @@ MatchFilter::MatchFilter(const DictionaryValue* details)
bool MatchFilter::MatchesCookie(
const net::CookieMonster::CanonicalCookie& cookie) {
- return
- MatchesString(keys::kNameKey, cookie.Name()) &&
- MatchesDomain(cookie.Domain()) &&
- MatchesString(keys::kPathKey, cookie.Path()) &&
- MatchesBoolean(keys::kSecureKey, cookie.IsSecure()) &&
- MatchesBoolean(keys::kSessionKey, !cookie.DoesExpire());
+ return MatchesString(keys::kNameKey, cookie.Name()) &&
+ MatchesDomain(cookie.Domain()) &&
+ MatchesString(keys::kPathKey, cookie.Path()) &&
+ MatchesBoolean(keys::kSecureKey, cookie.IsSecure()) &&
+ MatchesBoolean(keys::kSessionKey, !cookie.DoesExpire());
}
-bool MatchFilter::MatchesString(const wchar_t* key, const std::string& value) {
+bool MatchFilter::MatchesString(const char* key, const std::string& value) {
if (!details_->HasKey(key))
return true;
std::string filter_value;
@@ -145,7 +144,7 @@ bool MatchFilter::MatchesString(const wchar_t* key, const std::string& value) {
value == filter_value);
}
-bool MatchFilter::MatchesBoolean(const wchar_t* key, bool value) {
+bool MatchFilter::MatchesBoolean(const char* key, bool value) {
if (!details_->HasKey(key))
return true;
bool filter_value = false;
diff --git a/chrome/browser/extensions/extension_cookies_helpers.h b/chrome/browser/extensions/extension_cookies_helpers.h
index c7a5056..7bb33d2 100644
--- a/chrome/browser/extensions/extension_cookies_helpers.h
+++ b/chrome/browser/extensions/extension_cookies_helpers.h
@@ -94,12 +94,12 @@ class MatchFilter {
// Returns true if the details dictionary contains a string with the given
// key and value. Also returns true if the dictionary doesn't contain the
// given key at all (trival match).
- bool MatchesString(const wchar_t* key, const std::string& value);
+ bool MatchesString(const char* key, const std::string& value);
// Returns true if the details dictionary contains a boolean with the given
// key and value. Also returns true if the dictionary doesn't contain the
// given key at all (trival match).
- bool MatchesBoolean(const wchar_t* key, bool value);
+ bool MatchesBoolean(const char* key, bool value);
// Returns true if the given cookie domain string matches the filter's
// domain. Any cookie domain which is equal to or is a subdomain of the