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

Side by Side Diff: chrome/common/extensions/docs/examples/api/preferences/allowThirdPartyCookies/popup.js

Issue 9244005: Move the `privacy` extension API out of experimental. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: License. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 var pref = chrome.experimental.privacy.websites.thirdPartyCookiesAllowed; 6 var pref = chrome.privacy.websites.thirdPartyCookiesAllowed;
7 7
8 function $(id) { 8 function $(id) {
9 return document.getElementById(id); 9 return document.getElementById(id);
10 } 10 }
11 11
12 /** 12 /**
13 * Returns whether the |levelOfControl| means that the extension can change the 13 * Returns whether the |levelOfControl| means that the extension can change the
14 * preference value. 14 * preference value.
15 * 15 *
16 * @param levelOfControl{string} 16 * @param levelOfControl{string}
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Explicitly set the value for incognito mode. 118 // Explicitly set the value for incognito mode.
119 pref.get({'incognito': true}, function(settings) { 119 pref.get({'incognito': true}, function(settings) {
120 pref.set({'incognito': true, 'value': settings.value}); 120 pref.set({'incognito': true, 'value': settings.value});
121 }); 121 });
122 } 122 }
123 document.getElementById('incognitoValue').disabled = !value; 123 document.getElementById('incognitoValue').disabled = !value;
124 } 124 }
125 125
126 // Call `init` to kick things off. 126 // Call `init` to kick things off.
127 document.addEventListener('DOMContentLoaded', init); 127 document.addEventListener('DOMContentLoaded', init);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698