Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.h

Issue 8198003: Convert app_launch_index and page_index from int to StringOrdinal. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changing strings to StringOrdinals Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/extension_install_ui.h" 10 #include "chrome/browser/extensions/extension_install_ui.h"
11 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 11 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
12 #include "chrome/browser/favicon/favicon_service.h" 12 #include "chrome/browser/favicon/favicon_service.h"
13 #include "chrome/browser/prefs/pref_change_registrar.h" 13 #include "chrome/browser/prefs/pref_change_registrar.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "chrome/common/extensions/extension_constants.h" 15 #include "chrome/common/extensions/extension_constants.h"
16 #include "chrome/common/string_ordinal.h"
16 #include "content/browser/cancelable_request.h" 17 #include "content/browser/cancelable_request.h"
17 #include "content/browser/webui/web_ui.h" 18 #include "content/browser/webui/web_ui.h"
18 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
20 21
21 class AppNotification; 22 class AppNotification;
22 class ExtensionPrefs; 23 class ExtensionPrefs;
23 class ExtensionService; 24 class ExtensionService;
24 class PrefChangeRegistrar; 25 class PrefChangeRegistrar;
25 class PrefsService; 26 class PrefsService;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void HandleNotificationClose(const base::ListValue* args); 116 void HandleNotificationClose(const base::ListValue* args);
116 117
117 // Register app launcher preferences. 118 // Register app launcher preferences.
118 static void RegisterUserPrefs(PrefService* pref_service); 119 static void RegisterUserPrefs(PrefService* pref_service);
119 120
120 private: 121 private:
121 struct AppInstallInfo { 122 struct AppInstallInfo {
122 bool is_bookmark_app; 123 bool is_bookmark_app;
123 string16 title; 124 string16 title;
124 GURL app_url; 125 GURL app_url;
125 int page_index; 126 StringOrdinal page_index;
126 }; 127 };
127 128
128 // Records a web store launch in the appropriate histograms. |promo_active| 129 // Records a web store launch in the appropriate histograms. |promo_active|
129 // specifies if the web store promotion was active. 130 // specifies if the web store promotion was active.
130 static void RecordWebStoreLaunch(bool promo_active); 131 static void RecordWebStoreLaunch(bool promo_active);
131 132
132 // 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
133 // histogram. |promo_active| specifies if the web store promotion was active. 134 // histogram. |promo_active| specifies if the web store promotion was active.
134 static void RecordAppLaunchByID(bool promo_active, 135 static void RecordAppLaunchByID(bool promo_active,
135 extension_misc::AppLaunchBucket bucket); 136 extension_misc::AppLaunchBucket bucket);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // when the app is added to the page (via getAppsCallback or appAdded). 209 // when the app is added to the page (via getAppsCallback or appAdded).
209 std::string highlight_app_id_; 210 std::string highlight_app_id_;
210 211
211 // Hold state for favicon requests. 212 // Hold state for favicon requests.
212 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; 213 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_;
213 214
214 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); 215 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
215 }; 216 };
216 217
217 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ 218 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698