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

Unified Diff: chrome/browser/extensions/extension_app_api.cc

Issue 8567018: Limit number of notifications that can be received by the client. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
Index: chrome/browser/extensions/extension_app_api.cc
===================================================================
--- chrome/browser/extensions/extension_app_api.cc (revision 109957)
+++ chrome/browser/extensions/extension_app_api.cc (working copy)
@@ -17,6 +17,7 @@
const char kLinkTextKey[] = "linkText";
const char kLinkUrlKey[] = "linkUrl";
const char kTitleKey[] = "title";
+const char kCreationKey[] = "creation_timestamp_ms";
const char kInvalidExtensionIdError[] =
"Invalid extension id";
@@ -46,8 +47,13 @@
if (details->HasKey(kBodyTextKey))
EXTENSION_FUNCTION_VALIDATE(details->GetString(kBodyTextKey, &body));
+ double creation_timestamp_ms;
+ if (details->HasKey(kCreationKey))
+ EXTENSION_FUNCTION_VALIDATE(details->GetDouble(kCreationKey,
+ &creation_timestamp_ms));
Munjal (Google) 2011/11/17 19:45:32 Shouldn't we just fill in creation time ourselves
elvin 2011/11/17 22:28:17 Done.
asargent_no_longer_on_chrome 2011/11/17 22:36:24 Yeah, we should just use Time::Now()
elvin 2011/11/17 22:52:58 Done.
+
scoped_ptr<AppNotification> item(new AppNotification(
- true, "", id, title, body));
+ true, 0, "", id, title, body));
if (details->HasKey(kLinkUrlKey)) {
std::string link_url;

Powered by Google App Engine
This is Rietveld 408576698