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

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: Adding constness and comments 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 <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/extensions/extension_install_ui.h" 12 #include "chrome/browser/extensions/extension_install_ui.h"
13 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 13 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
14 #include "chrome/browser/favicon/favicon_service.h" 14 #include "chrome/browser/favicon/favicon_service.h"
15 #include "chrome/browser/prefs/pref_change_registrar.h" 15 #include "chrome/browser/prefs/pref_change_registrar.h"
16 #include "chrome/common/extensions/extension.h" 16 #include "chrome/common/extensions/extension.h"
17 #include "chrome/common/extensions/extension_constants.h" 17 #include "chrome/common/extensions/extension_constants.h"
18 #include "chrome/common/string_ordinal.h"
18 #include "content/browser/cancelable_request.h" 19 #include "content/browser/cancelable_request.h"
19 #include "content/browser/webui/web_ui.h" 20 #include "content/browser/webui/web_ui.h"
20 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
22 23
23 class AppNotification; 24 class AppNotification;
24 class ExtensionService; 25 class ExtensionService;
25 class PrefChangeRegistrar; 26 class PrefChangeRegistrar;
26 class Profile; 27 class Profile;
27 28
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void HandleNotificationClose(const base::ListValue* args); 111 void HandleNotificationClose(const base::ListValue* args);
111 112
112 // Register app launcher preferences. 113 // Register app launcher preferences.
113 static void RegisterUserPrefs(PrefService* pref_service); 114 static void RegisterUserPrefs(PrefService* pref_service);
114 115
115 private: 116 private:
116 struct AppInstallInfo { 117 struct AppInstallInfo {
117 bool is_bookmark_app; 118 bool is_bookmark_app;
118 string16 title; 119 string16 title;
119 GURL app_url; 120 GURL app_url;
120 int page_index; 121 StringOrdinal page_index;
121 }; 122 };
122 123
123 // Records a web store launch in the appropriate histograms. |promo_active| 124 // Records a web store launch in the appropriate histograms. |promo_active|
124 // specifies if the web store promotion was active. 125 // specifies if the web store promotion was active.
125 static void RecordWebStoreLaunch(bool promo_active); 126 static void RecordWebStoreLaunch(bool promo_active);
126 127
127 // Records an app launch in the corresponding |bucket| of the app launch 128 // Records an app launch in the corresponding |bucket| of the app launch
128 // histogram. |promo_active| specifies if the web store promotion was active. 129 // histogram. |promo_active| specifies if the web store promotion was active.
129 static void RecordAppLaunchByID(bool promo_active, 130 static void RecordAppLaunchByID(bool promo_active,
130 extension_misc::AppLaunchBucket bucket); 131 extension_misc::AppLaunchBucket bucket);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // when the app is added to the page (via getAppsCallback or appAdded). 204 // when the app is added to the page (via getAppsCallback or appAdded).
204 std::string highlight_app_id_; 205 std::string highlight_app_id_;
205 206
206 // Hold state for favicon requests. 207 // Hold state for favicon requests.
207 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; 208 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_;
208 209
209 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); 210 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
210 }; 211 };
211 212
212 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ 213 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698