| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/dom_ui/app_launcher_handler.h" | 5 #include "chrome/browser/dom_ui/app_launcher_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
| 24 #include "chrome/browser/ui/browser_list.h" | 24 #include "chrome/browser/ui/browser_list.h" |
| 25 #include "chrome/browser/ui/browser_window.h" | 25 #include "chrome/browser/ui/browser_window.h" |
| 26 #include "chrome/common/extensions/extension.h" | 26 #include "chrome/common/extensions/extension.h" |
| 27 #include "chrome/common/extensions/extension_constants.h" | 27 #include "chrome/common/extensions/extension_constants.h" |
| 28 #include "chrome/common/extensions/extension_icon_set.h" | 28 #include "chrome/common/extensions/extension_icon_set.h" |
| 29 #include "chrome/common/extensions/extension_resource.h" | 29 #include "chrome/common/extensions/extension_resource.h" |
| 30 #include "chrome/common/notification_service.h" | 30 #include "chrome/common/notification_service.h" |
| 31 #include "chrome/common/notification_type.h" | 31 #include "chrome/common/notification_type.h" |
| 32 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
| 33 #include "gfx/rect.h" | |
| 34 #include "grit/browser_resources.h" | 33 #include "grit/browser_resources.h" |
| 35 #include "grit/generated_resources.h" | 34 #include "grit/generated_resources.h" |
| 36 #include "ui/base/animation/animation.h" | 35 #include "ui/base/animation/animation.h" |
| 36 #include "ui/gfx/rect.h" |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // The URL prefixes used by the NTP to signal when the web store or an app | 40 // The URL prefixes used by the NTP to signal when the web store or an app |
| 41 // has launched. These are used for histogram purposes. | 41 // has launched. These are used for histogram purposes. |
| 42 const char* kLaunchAppPingURL = "record-app-launch"; | 42 const char* kLaunchAppPingURL = "record-app-launch"; |
| 43 const char* kLaunchWebStorePingURL = "record-webstore-launch"; | 43 const char* kLaunchWebStorePingURL = "record-webstore-launch"; |
| 44 | 44 |
| 45 // This extracts an int from a ListValue at the given |index|. | 45 // This extracts an int from a ListValue at the given |index|. |
| 46 bool ExtractInt(const ListValue* list, size_t index, int* out_int) { | 46 bool ExtractInt(const ListValue* list, size_t index, int* out_int) { |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 448 |
| 449 void AppLauncherHandler::UninstallDefaultApps() { | 449 void AppLauncherHandler::UninstallDefaultApps() { |
| 450 DefaultApps* default_apps = extensions_service_->default_apps(); | 450 DefaultApps* default_apps = extensions_service_->default_apps(); |
| 451 const ExtensionIdSet& app_ids = default_apps->default_apps(); | 451 const ExtensionIdSet& app_ids = default_apps->default_apps(); |
| 452 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); | 452 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); |
| 453 iter != app_ids.end(); ++iter) { | 453 iter != app_ids.end(); ++iter) { |
| 454 if (extensions_service_->GetExtensionById(*iter, true)) | 454 if (extensions_service_->GetExtensionById(*iter, true)) |
| 455 extensions_service_->UninstallExtension(*iter, false); | 455 extensions_service_->UninstallExtension(*iter, false); |
| 456 } | 456 } |
| 457 } | 457 } |
| OLD | NEW |