OLD | NEW |
1 // Copyright (c) 2012 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" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #include "content/public/browser/web_ui.h" | 47 #include "content/public/browser/web_ui.h" |
48 #include "googleurl/src/gurl.h" | 48 #include "googleurl/src/gurl.h" |
49 #include "grit/browser_resources.h" | 49 #include "grit/browser_resources.h" |
50 #include "grit/generated_resources.h" | 50 #include "grit/generated_resources.h" |
51 #include "net/base/escape.h" | 51 #include "net/base/escape.h" |
52 #include "ui/base/animation/animation.h" | 52 #include "ui/base/animation/animation.h" |
53 #include "ui/base/l10n/l10n_util.h" | 53 #include "ui/base/l10n/l10n_util.h" |
54 #include "ui/gfx/codec/png_codec.h" | 54 #include "ui/gfx/codec/png_codec.h" |
55 | 55 |
56 using content::WebContents; | 56 using content::WebContents; |
| 57 using extensions::CrxInstaller; |
57 using extensions::Extension; | 58 using extensions::Extension; |
58 | 59 |
59 namespace { | 60 namespace { |
60 | 61 |
61 const net::UnescapeRule::Type kUnescapeRules = | 62 const net::UnescapeRule::Type kUnescapeRules = |
62 net::UnescapeRule::NORMAL | net::UnescapeRule::URL_SPECIAL_CHARS; | 63 net::UnescapeRule::NORMAL | net::UnescapeRule::URL_SPECIAL_CHARS; |
63 | 64 |
64 extension_misc::AppLaunchBucket ParseLaunchSource( | 65 extension_misc::AppLaunchBucket ParseLaunchSource( |
65 const std::string& launch_source) { | 66 const std::string& launch_source) { |
66 int bucket_num = extension_misc::APP_LAUNCH_BUCKET_INVALID; | 67 int bucket_num = extension_misc::APP_LAUNCH_BUCKET_INVALID; |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 | 997 |
997 void AppLauncherHandler::UninstallDefaultApps() { | 998 void AppLauncherHandler::UninstallDefaultApps() { |
998 AppsPromo* apps_promo = extension_service_->apps_promo(); | 999 AppsPromo* apps_promo = extension_service_->apps_promo(); |
999 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps(); | 1000 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps(); |
1000 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin(); | 1001 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin(); |
1001 iter != app_ids.end(); ++iter) { | 1002 iter != app_ids.end(); ++iter) { |
1002 if (extension_service_->GetExtensionById(*iter, true)) | 1003 if (extension_service_->GetExtensionById(*iter, true)) |
1003 extension_service_->UninstallExtension(*iter, false, NULL); | 1004 extension_service_->UninstallExtension(*iter, false, NULL); |
1004 } | 1005 } |
1005 } | 1006 } |
OLD | NEW |