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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::Extension; | 57 using extensions::Extension; |
| 58 using extensions::ExtensionPrefs; |
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; |
67 base::StringToInt(launch_source, &bucket_num); | 68 base::StringToInt(launch_source, &bucket_num); |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 | 982 |
982 void AppLauncherHandler::UninstallDefaultApps() { | 983 void AppLauncherHandler::UninstallDefaultApps() { |
983 AppsPromo* apps_promo = extension_service_->apps_promo(); | 984 AppsPromo* apps_promo = extension_service_->apps_promo(); |
984 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps(); | 985 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps(); |
985 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin(); | 986 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin(); |
986 iter != app_ids.end(); ++iter) { | 987 iter != app_ids.end(); ++iter) { |
987 if (extension_service_->GetExtensionById(*iter, true)) | 988 if (extension_service_->GetExtensionById(*iter, true)) |
988 extension_service_->UninstallExtension(*iter, false, NULL); | 989 extension_service_->UninstallExtension(*iter, false, NULL); |
989 } | 990 } |
990 } | 991 } |
OLD | NEW |