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

Unified Diff: chrome/common/extensions/docs/examples/extensions/buildbot/prefs.js

Issue 18401004: Continuously update status in the buildbot extension popup window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add copyright Created 7 years, 5 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/common/extensions/docs/examples/extensions/buildbot/prefs.js
diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot/prefs.js b/chrome/common/extensions/docs/examples/extensions/buildbot/prefs.js
index d8df783a218cc9e4067ce0c6993f2ecee8b31c0c..3071be347d53dd470e3d82fa0aabb136955119e2 100644
--- a/chrome/common/extensions/docs/examples/extensions/buildbot/prefs.js
+++ b/chrome/common/extensions/docs/examples/extensions/buildbot/prefs.js
@@ -2,12 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-function Prefs() {
+(function() {
+
+window.buildbot = window.buildbot || {};
+
+buildbot.PrefStore = function() {
this.defaults_ = {prefs: {use_notifications: false,
- try_job_username: ""}};
-}
+ try_job_username: null}};
+};
-Prefs.prototype = {
+buildbot.PrefStore.prototype = {
get_: function(key, callback) {
chrome.storage.sync.get(this.defaults_,
function (storage) {
@@ -39,3 +43,5 @@ Prefs.prototype = {
this.set_("try_job_username", try_job_username);
}
};
+
+})();

Powered by Google App Engine
This is Rietveld 408576698