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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_api.cc

Issue 179043005: [GCM] Remove the requirement for manifest key (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | chrome/browser/extensions/api/gcm/gcm_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/gcm/gcm_api.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.cc b/chrome/browser/extensions/api/gcm/gcm_api.cc
index ca57f8af9eff399d596e6390336646f32595c450..0ffbe3b373a29bd1489c407dc908a3a83a7f72a2 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc
@@ -31,7 +31,6 @@ const char kGoogleRestrictedPrefix[] = "google";
const char kInvalidParameter[] =
"Function was called with invalid parameters.";
const char kNotSignedIn[] = "Profile was not signed in.";
-const char kCertificateMissing[] = "Manifest key was missing.";
const char kAsyncOperationPending[] =
"Asynchronous operation is pending.";
const char kNetworkError[] = "Network error occurred.";
@@ -52,8 +51,6 @@ const char* GcmResultToError(gcm::GCMClient::Result result) {
return kInvalidParameter;
case gcm::GCMClient::NOT_SIGNED_IN:
return kNotSignedIn;
- case gcm::GCMClient::CERTIFICATE_MISSING:
- return kCertificateMissing;
case gcm::GCMClient::ASYNC_OPERATION_PENDING:
return kAsyncOperationPending;
case gcm::GCMClient::NETWORK_ERROR:
@@ -121,16 +118,10 @@ bool GcmRegisterFunction::DoWork() {
api::gcm::Register::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
- if (GetExtension()->public_key().empty()) {
- CompleteFunctionWithResult(std::string(),
- gcm::GCMClient::CERTIFICATE_MISSING);
- return false;
- }
-
GCMProfileService()->Register(
GetExtension()->id(),
params->sender_ids,
- SHA1HashHexString(GetExtension()->public_key()),
+ SHA1HashHexString(GetExtension()->id()),
fgorski 2014/02/27 23:39:30 please investigate if we need to pass a certificat
jianli 2014/02/28 19:53:40 Per discussion, the cert is not needed any more.
base::Bind(&GcmRegisterFunction::CompleteFunctionWithResult, this));
return true;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/gcm/gcm_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698