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

Unified Diff: chrome/browser/resources/google_now/cards.js

Issue 22647003: Remove chrome.* Function Instrumentation Inlining and Use a Separate Instrumented Object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SMLog
Patch Set: Quick Spacing Fix Created 7 years, 4 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
Index: chrome/browser/resources/google_now/cards.js
diff --git a/chrome/browser/resources/google_now/cards.js b/chrome/browser/resources/google_now/cards.js
index 09ca6e1c709637346ff50d2af4b29d1881784f17..5e2481938e5a9cbbef943f5d6b9c6a1cd6be6f95 100644
--- a/chrome/browser/resources/google_now/cards.js
+++ b/chrome/browser/resources/google_now/cards.js
@@ -43,7 +43,7 @@ function buildCardSet() {
try {
// Delete a notification with the specified id if it already exists, and
// then create a notification.
- chrome.notifications.create(
+ instrumented.notifications.create(
cardId,
cardCreateInfo.notification,
function(newNotificationId) {
@@ -63,7 +63,7 @@ function buildCardSet() {
} else {
try {
// Update existing notification.
- chrome.notifications.update(
+ instrumented.notifications.update(
cardId,
cardCreateInfo.notification,
function(wasUpdated) {
@@ -147,13 +147,13 @@ function buildCardSet() {
chrome.alarms.clear(cardHidePrefix + cardId);
}
- chrome.alarms.onAlarm.addListener(function(alarm) {
+ instrumented.alarms.onAlarm.addListener(function(alarm) {
console.log('cardManager.onAlarm ' + JSON.stringify(alarm));
if (alarm.name.indexOf(cardShowPrefix) == 0) {
// Alarm to show the card.
var cardId = alarm.name.substring(cardShowPrefix.length);
- storage.get('notificationsData', function(items) {
+ instrumented.storage.local.get('notificationsData', function(items) {
items.notificationsData = items.notificationsData || {};
console.log('cardManager.onAlarm.get ' + JSON.stringify(items));
var notificationData = items.notificationsData[cardId];

Powered by Google App Engine
This is Rietveld 408576698