OLD | NEW |
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 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" | 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/callback_old.h" | |
14 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
15 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
16 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
17 #include "base/string_split.h" | 16 #include "base/string_split.h" |
18 #include "base/string_util.h" | 17 #include "base/string_util.h" |
19 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
20 #include "base/values.h" | 19 #include "base/values.h" |
21 #include "chrome/browser/extensions/app_notification_manager.h" | 20 #include "chrome/browser/extensions/app_notification_manager.h" |
22 #include "chrome/browser/extensions/apps_promo.h" | 21 #include "chrome/browser/extensions/apps_promo.h" |
23 #include "chrome/browser/extensions/crx_installer.h" | 22 #include "chrome/browser/extensions/crx_installer.h" |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 | 982 |
984 void AppLauncherHandler::UninstallDefaultApps() { | 983 void AppLauncherHandler::UninstallDefaultApps() { |
985 AppsPromo* apps_promo = extension_service_->apps_promo(); | 984 AppsPromo* apps_promo = extension_service_->apps_promo(); |
986 const ExtensionIdSet& app_ids = apps_promo->old_default_apps(); | 985 const ExtensionIdSet& app_ids = apps_promo->old_default_apps(); |
987 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); | 986 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); |
988 iter != app_ids.end(); ++iter) { | 987 iter != app_ids.end(); ++iter) { |
989 if (extension_service_->GetExtensionById(*iter, true)) | 988 if (extension_service_->GetExtensionById(*iter, true)) |
990 extension_service_->UninstallExtension(*iter, false, NULL); | 989 extension_service_->UninstallExtension(*iter, false, NULL); |
991 } | 990 } |
992 } | 991 } |
OLD | NEW |