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

Side by Side Diff: chrome/browser/ui/webui/welcome_handler.h

Issue 2416333003: Adding Histograms for new Desktop First Run. (Closed)
Patch Set: Removing Win10 portions Created 4 years, 2 months 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/welcome_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WELCOME_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/web_ui_message_handler.h" 9 #include "content/public/browser/web_ui_message_handler.h"
10 #include "google_apis/gaia/oauth2_token_service.h" 10 #include "google_apis/gaia/oauth2_token_service.h"
(...skipping 10 matching lines...) Expand all
21 ~WelcomeHandler() override; 21 ~WelcomeHandler() override;
22 22
23 // OAuth2TokenService::Observer: 23 // OAuth2TokenService::Observer:
24 void OnRefreshTokenAvailable(const std::string& account_id) override; 24 void OnRefreshTokenAvailable(const std::string& account_id) override;
25 25
26 // content::WebUIMessageHandler: 26 // content::WebUIMessageHandler:
27 void RegisterMessages() override; 27 void RegisterMessages() override;
28 28
29 private: 29 private:
30 enum WelcomeResult { 30 enum WelcomeResult {
31 DEFAULT = 0, 31 DEFAULT = 0, // User navigated away from the page.
rkaplow 2016/10/21 15:06:05 small nit - might make more sense for this to NAVI
tmartino 2016/10/21 18:50:57 IMO DEFAULT makes the most sense. It's only really
32 SIGNED_IN, // User clicked the "Sign In" button and completed sign-in. 32 DECLINED = 1, // User clicked the "No Thanks" button.
33 DECLINED // User clicked the "No Thanks" button. 33 SIGNED_IN = 2, // User clicked the "Sign In" button and completed sign-in.
34
35 // New results must be added before this line, and should correspond to
36 // values in tools/metrics/histograms/histograms.xml.
37 WELCOME_RESULT_MAX
34 }; 38 };
35 39
36 void HandleActivateSignIn(const base::ListValue* args); 40 void HandleActivateSignIn(const base::ListValue* args);
37 void HandleUserDecline(const base::ListValue* args); 41 void HandleUserDecline(const base::ListValue* args);
38 void GoToNewTabPage(); 42 void GoToNewTabPage();
39 43
40 Browser* GetBrowser(); 44 Browser* GetBrowser();
41 45
42 Profile* profile_; 46 Profile* profile_;
43 ProfileOAuth2TokenService* oauth2_token_service_; 47 ProfileOAuth2TokenService* oauth2_token_service_;
44 WelcomeResult result_; 48 WelcomeResult result_;
45 49
46 DISALLOW_COPY_AND_ASSIGN(WelcomeHandler); 50 DISALLOW_COPY_AND_ASSIGN(WelcomeHandler);
47 }; 51 };
48 52
49 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_H_ 53 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/welcome_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698