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

Side by Side Diff: chrome/browser/resources/chromeos/offers/main.js

Issue 9865016: [Chrome OS ECHO] Add cookies permission to extension and change intent disposition to inline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 function couponCodeCallback(result) {
6 response = "getCouponCode returned: " + result;
7 console.log(response);
8 }
9
10 function consentCallback(result) {
11 if (result == true) {
12 chrome.offersPrivate.getCouponCode("COUPON_CODE", couponCodeCallback);
13 return;
14 }
15 console.log("User declined ECHO!");
16 }
17
18 window.onload = function() {
19 chrome.offersPrivate.getUserConsent(consentCallback);
20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698