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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/signin/inline_login_handler_impl.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/callback_helpers.h" 13 #include "base/callback_helpers.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
17 #include "base/metrics/user_metrics.h"
17 #include "base/metrics/user_metrics_action.h" 18 #include "base/metrics/user_metrics_action.h"
18 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
19 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
22 #include "base/threading/thread_task_runner_handle.h" 23 #include "base/threading/thread_task_runner_handle.h"
23 #include "base/values.h" 24 #include "base/values.h"
24 #include "chrome/browser/browser_process.h" 25 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/profiles/profile_attributes_entry.h" 27 #include "chrome/browser/profiles/profile_attributes_entry.h"
(...skipping 29 matching lines...) Expand all
56 #include "components/signin/core/browser/profile_oauth2_token_service.h" 57 #include "components/signin/core/browser/profile_oauth2_token_service.h"
57 #include "components/signin/core/browser/signin_error_controller.h" 58 #include "components/signin/core/browser/signin_error_controller.h"
58 #include "components/signin/core/browser/signin_header_helper.h" 59 #include "components/signin/core/browser/signin_header_helper.h"
59 #include "components/signin/core/browser/signin_investigator.h" 60 #include "components/signin/core/browser/signin_investigator.h"
60 #include "components/signin/core/browser/signin_metrics.h" 61 #include "components/signin/core/browser/signin_metrics.h"
61 #include "components/signin/core/common/profile_management_switches.h" 62 #include "components/signin/core/common/profile_management_switches.h"
62 #include "components/signin/core/common/signin_pref_names.h" 63 #include "components/signin/core/common/signin_pref_names.h"
63 #include "components/strings/grit/components_strings.h" 64 #include "components/strings/grit/components_strings.h"
64 #include "content/public/browser/navigation_handle.h" 65 #include "content/public/browser/navigation_handle.h"
65 #include "content/public/browser/storage_partition.h" 66 #include "content/public/browser/storage_partition.h"
66 #include "content/public/browser/user_metrics.h"
67 #include "content/public/browser/web_ui.h" 67 #include "content/public/browser/web_ui.h"
68 #include "google_apis/gaia/gaia_auth_fetcher.h" 68 #include "google_apis/gaia/gaia_auth_fetcher.h"
69 #include "google_apis/gaia/gaia_auth_util.h" 69 #include "google_apis/gaia/gaia_auth_util.h"
70 #include "google_apis/gaia/gaia_constants.h" 70 #include "google_apis/gaia/gaia_constants.h"
71 #include "google_apis/gaia/gaia_urls.h" 71 #include "google_apis/gaia/gaia_urls.h"
72 #include "net/base/url_util.h" 72 #include "net/base/url_util.h"
73 #include "ui/base/l10n/l10n_util.h" 73 #include "ui/base/l10n/l10n_util.h"
74 74
75 namespace { 75 namespace {
76 76
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 void InlineSigninHelper::ConfirmEmailAction( 346 void InlineSigninHelper::ConfirmEmailAction(
347 content::WebContents* web_contents, 347 content::WebContents* web_contents,
348 const std::string& refresh_token, 348 const std::string& refresh_token,
349 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required, 349 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required,
350 OneClickSigninSyncStarter::StartSyncMode start_mode, 350 OneClickSigninSyncStarter::StartSyncMode start_mode,
351 SigninEmailConfirmationDialog::Action action) { 351 SigninEmailConfirmationDialog::Action action) {
352 Browser* browser = chrome::FindLastActiveWithProfile(profile_); 352 Browser* browser = chrome::FindLastActiveWithProfile(profile_);
353 switch (action) { 353 switch (action) {
354 case SigninEmailConfirmationDialog::CREATE_NEW_USER: 354 case SigninEmailConfirmationDialog::CREATE_NEW_USER:
355 content::RecordAction( 355 base::RecordAction(
356 base::UserMetricsAction("Signin_ImportDataPrompt_DontImport")); 356 base::UserMetricsAction("Signin_ImportDataPrompt_DontImport"));
357 CreateSyncStarter(browser, web_contents, current_url_, GURL(), 357 CreateSyncStarter(browser, web_contents, current_url_, GURL(),
358 refresh_token, OneClickSigninSyncStarter::NEW_PROFILE, 358 refresh_token, OneClickSigninSyncStarter::NEW_PROFILE,
359 start_mode, confirmation_required); 359 start_mode, confirmation_required);
360 break; 360 break;
361 case SigninEmailConfirmationDialog::START_SYNC: 361 case SigninEmailConfirmationDialog::START_SYNC:
362 content::RecordAction( 362 base::RecordAction(
363 base::UserMetricsAction("Signin_ImportDataPrompt_ImportData")); 363 base::UserMetricsAction("Signin_ImportDataPrompt_ImportData"));
364 CreateSyncStarter(browser, web_contents, current_url_, GURL(), 364 CreateSyncStarter(browser, web_contents, current_url_, GURL(),
365 refresh_token, 365 refresh_token,
366 OneClickSigninSyncStarter::CURRENT_PROFILE, start_mode, 366 OneClickSigninSyncStarter::CURRENT_PROFILE, start_mode,
367 confirmation_required); 367 confirmation_required);
368 break; 368 break;
369 case SigninEmailConfirmationDialog::CLOSE: 369 case SigninEmailConfirmationDialog::CLOSE:
370 content::RecordAction( 370 base::RecordAction(
371 base::UserMetricsAction("Signin_ImportDataPrompt_Cancel")); 371 base::UserMetricsAction("Signin_ImportDataPrompt_Cancel"));
372 if (handler_) { 372 if (handler_) {
373 handler_->SyncStarterCallback( 373 handler_->SyncStarterCallback(
374 OneClickSigninSyncStarter::SYNC_SETUP_FAILURE); 374 OneClickSigninSyncStarter::SYNC_SETUP_FAILURE);
375 } 375 }
376 break; 376 break;
377 default: 377 default:
378 DCHECK(false) << "Invalid action"; 378 DCHECK(false) << "Invalid action";
379 } 379 }
380 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 380 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 881
882 if (show_account_management) { 882 if (show_account_management) {
883 browser->window()->ShowAvatarBubbleFromAvatarButton( 883 browser->window()->ShowAvatarBubbleFromAvatarButton(
884 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 884 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
885 signin::ManageAccountsParams(), 885 signin::ManageAccountsParams(),
886 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN, 886 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN,
887 false); 887 false);
888 } 888 }
889 } 889 }
890 } 890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698