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

Unified Diff: content/common/experiments/api_key.cc

Issue 1563903002: Add public key and signature verification to browser-side API keys Base URL: https://chromium.googlesource.com/chromium/src.git@keys
Patch Set: Created 4 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 | « content/common/experiments/api_key.h ('k') | content/common/experiments/api_key_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/experiments/api_key.cc
diff --git a/content/common/experiments/api_key.cc b/content/common/experiments/api_key.cc
index 09b607f5a523005feca5332e64728b2801dfb127..2143692dcebbed61399324acfb8cb265f743d271 100644
--- a/content/common/experiments/api_key.cc
+++ b/content/common/experiments/api_key.cc
@@ -19,7 +19,8 @@ namespace content {
namespace {
const char* kApiKeyFieldSeparator = "|";
-}
+
+} // namespace
ApiKey::~ApiKey() {}
@@ -30,6 +31,8 @@ scoped_ptr<ApiKey> ApiKey::Parse(const std::string& key_text) {
// API Key should resemble:
// signature|origin|api_name|expiry_timestamp
+ // TODO(iclelland): Add version code to API key format to identify key algo
+ // https://crbug.com/570684
std::vector<std::string> parts =
SplitString(key_text, kApiKeyFieldSeparator, base::KEEP_WHITESPACE,
base::SPLIT_WANT_ALL);
@@ -76,12 +79,6 @@ bool ApiKey::IsAppropriate(const std::string& origin,
return ValidateOrigin(origin) && ValidateApiName(api_name);
}
-bool ApiKey::IsValid(const base::Time& now) const {
- // TODO(iclelland): Validate signature on key data here as well.
- // https://crbug.com/543215
- return ValidateDate(now);
-}
-
bool ApiKey::ValidateOrigin(const std::string& origin) const {
return GURL(origin) == origin_;
}
« no previous file with comments | « content/common/experiments/api_key.h ('k') | content/common/experiments/api_key_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698