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

Side by Side Diff: chrome/test/data/extensions/management/themes/uninstall.js

Issue 6546072: Clean up how we handle themes in the extensions system and management API.... Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 chrome.management.getAll(function(items) {
6 var theme = null;
7 for (var i = 0; i < items.length; i++) {
8 var item = items[i];
9 if (item.isTheme && item.enabled) {
10 if (theme) {
11 console.log("more than 1 enabled theme!");
12 return;
13 }
14 theme = item;
15 }
16 }
17 if (theme) {
18 chrome.management.uninstall(theme.id, function() {
19 chrome.test.sendMessage("ready");
20 });
21 }
22 });
23
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698