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.
5 // The name of the extension to uninstall, from manifest.json.
6 var EXPECTED_NAME = "Self Uninstall Test";
8 chrome.management.getAll(function(items) {
9 for (var i = 0; i < items.length; i++) {
11 if (item.name != EXPECTED_NAME) continue;
12 chrome.management.uninstall(item.id);