| 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 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 struct AppInstallInfo { | 116 struct AppInstallInfo { |
| 117 AppInstallInfo(); | 117 AppInstallInfo(); |
| 118 ~AppInstallInfo(); | 118 ~AppInstallInfo(); |
| 119 | 119 |
| 120 bool is_bookmark_app; | 120 bool is_bookmark_app; |
| 121 string16 title; | 121 string16 title; |
| 122 GURL app_url; | 122 GURL app_url; |
| 123 StringOrdinal page_ordinal; | 123 StringOrdinal page_ordinal; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // Reset some instance flags we use to track the currently uninstalling app. |
| 127 void CleanupAfterUninstall(); |
| 128 |
| 126 // Records a web store launch in the appropriate histograms. |promo_active| | 129 // Records a web store launch in the appropriate histograms. |promo_active| |
| 127 // specifies if the web store promotion was active. | 130 // specifies if the web store promotion was active. |
| 128 static void RecordWebStoreLaunch(bool promo_active); | 131 static void RecordWebStoreLaunch(bool promo_active); |
| 129 | 132 |
| 130 // Records an app launch in the corresponding |bucket| of the app launch | 133 // Records an app launch in the corresponding |bucket| of the app launch |
| 131 // histogram. |promo_active| specifies if the web store promotion was active. | 134 // histogram. |promo_active| specifies if the web store promotion was active. |
| 132 static void RecordAppLaunchByID(extension_misc::AppLaunchBucket bucket); | 135 static void RecordAppLaunchByID(extension_misc::AppLaunchBucket bucket); |
| 133 | 136 |
| 134 // Records an app launch in the corresponding |bucket| of the app launch | 137 // Records an app launch in the corresponding |bucket| of the app launch |
| 135 // histogram if the |escaped_url| corresponds to an installed app. | 138 // histogram if the |escaped_url| corresponds to an installed app. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // when the app is added to the page (via getAppsCallback or appAdded). | 205 // when the app is added to the page (via getAppsCallback or appAdded). |
| 203 std::string highlight_app_id_; | 206 std::string highlight_app_id_; |
| 204 | 207 |
| 205 // Hold state for favicon requests. | 208 // Hold state for favicon requests. |
| 206 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; | 209 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; |
| 207 | 210 |
| 208 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 211 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
| 209 }; | 212 }; |
| 210 | 213 |
| 211 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 214 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
| OLD | NEW |