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

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

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 8 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/user_manager_screen_handler.h" 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/feature_list.h" 13 #include "base/feature_list.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/user_metrics.h"
16 #include "base/profiler/scoped_tracker.h" 17 #include "base/profiler/scoped_tracker.h"
17 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
18 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
19 #include "base/threading/thread_task_runner_handle.h" 20 #include "base/threading/thread_task_runner_handle.h"
20 #include "base/value_conversions.h" 21 #include "base/value_conversions.h"
21 #include "base/values.h" 22 #include "base/values.h"
22 #include "chrome/browser/browser_process.h" 23 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/chrome_notification_types.h" 24 #include "chrome/browser/chrome_notification_types.h"
24 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h" 25 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h"
25 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
(...skipping 25 matching lines...) Expand all
51 #include "chrome/common/url_constants.h" 52 #include "chrome/common/url_constants.h"
52 #include "chrome/grit/chromium_strings.h" 53 #include "chrome/grit/chromium_strings.h"
53 #include "chrome/grit/generated_resources.h" 54 #include "chrome/grit/generated_resources.h"
54 #include "components/prefs/pref_service.h" 55 #include "components/prefs/pref_service.h"
55 #include "components/proximity_auth/screenlock_bridge.h" 56 #include "components/proximity_auth/screenlock_bridge.h"
56 #include "components/signin/core/account_id/account_id.h" 57 #include "components/signin/core/account_id/account_id.h"
57 #include "components/signin/core/common/profile_management_switches.h" 58 #include "components/signin/core/common/profile_management_switches.h"
58 #include "components/strings/grit/components_strings.h" 59 #include "components/strings/grit/components_strings.h"
59 #include "content/public/browser/notification_service.h" 60 #include "content/public/browser/notification_service.h"
60 #include "content/public/browser/storage_partition.h" 61 #include "content/public/browser/storage_partition.h"
61 #include "content/public/browser/user_metrics.h"
62 #include "content/public/browser/web_contents.h" 62 #include "content/public/browser/web_contents.h"
63 #include "content/public/browser/web_ui.h" 63 #include "content/public/browser/web_ui.h"
64 #include "google_apis/gaia/gaia_auth_fetcher.h" 64 #include "google_apis/gaia/gaia_auth_fetcher.h"
65 #include "google_apis/gaia/gaia_constants.h" 65 #include "google_apis/gaia/gaia_constants.h"
66 #include "third_party/skia/include/core/SkBitmap.h" 66 #include "third_party/skia/include/core/SkBitmap.h"
67 #include "ui/base/l10n/l10n_util.h" 67 #include "ui/base/l10n/l10n_util.h"
68 #include "ui/base/resource/resource_bundle.h" 68 #include "ui/base/resource/resource_bundle.h"
69 #include "ui/base/webui/web_ui_util.h" 69 #include "ui/base/webui/web_ui_util.h"
70 #include "ui/gfx/image/image.h" 70 #include "ui/gfx/image/image.h"
71 #include "ui/gfx/image/image_skia.h" 71 #include "ui/gfx/image/image_skia.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 const PrefService::Preference* guest_mode_enabled_pref = 304 const PrefService::Preference* guest_mode_enabled_pref =
305 service->FindPreference(prefs::kBrowserGuestModeEnabled); 305 service->FindPreference(prefs::kBrowserGuestModeEnabled);
306 const PrefService::Preference* add_person_enabled_pref = 306 const PrefService::Preference* add_person_enabled_pref =
307 service->FindPreference(prefs::kBrowserAddPersonEnabled); 307 service->FindPreference(prefs::kBrowserAddPersonEnabled);
308 308
309 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) && 309 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) &&
310 (guest_mode_enabled_pref->HasUserSetting() || 310 (guest_mode_enabled_pref->HasUserSetting() ||
311 add_person_enabled_pref->HasUserSetting())) { 311 add_person_enabled_pref->HasUserSetting())) {
312 service->ClearPref(guest_mode_enabled_pref->name()); 312 service->ClearPref(guest_mode_enabled_pref->name());
313 service->ClearPref(add_person_enabled_pref->name()); 313 service->ClearPref(add_person_enabled_pref->name());
314 content::RecordAction( 314 base::RecordAction(
315 base::UserMetricsAction("UserManager_Cleared_Legacy_User_Prefs")); 315 base::UserMetricsAction("UserManager_Cleared_Legacy_User_Prefs"));
316 } 316 }
317 } 317 }
318 318
319 UserManagerScreenHandler::~UserManagerScreenHandler() { 319 UserManagerScreenHandler::~UserManagerScreenHandler() {
320 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(NULL); 320 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(NULL);
321 } 321 }
322 322
323 void UserManagerScreenHandler::ShowBannerMessage( 323 void UserManagerScreenHandler::ShowBannerMessage(
324 const base::string16& message) { 324 const base::string16& message) {
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 Profile* profile, Profile::CreateStatus profile_create_status) { 1056 Profile* profile, Profile::CreateStatus profile_create_status) {
1057 Browser* browser = chrome::FindAnyBrowser(profile, false); 1057 Browser* browser = chrome::FindAnyBrowser(profile, false);
1058 if (browser && browser->window()) { 1058 if (browser && browser->window()) {
1059 OnBrowserWindowReady(browser); 1059 OnBrowserWindowReady(browser);
1060 } else { 1060 } else {
1061 registrar_.Add(this, 1061 registrar_.Add(this,
1062 chrome::NOTIFICATION_BROWSER_WINDOW_READY, 1062 chrome::NOTIFICATION_BROWSER_WINDOW_READY,
1063 content::NotificationService::AllSources()); 1063 content::NotificationService::AllSources());
1064 } 1064 }
1065 } 1065 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698