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

Side by Side Diff: chrome/browser/managed_mode/managed_user_service.cc

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/managed_mode/managed_user_service.h" 5 #include "chrome/browser/managed_mode/managed_user_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "content/public/browser/notification_source.h" 46 #include "content/public/browser/notification_source.h"
47 #include "content/public/browser/user_metrics.h" 47 #include "content/public/browser/user_metrics.h"
48 #include "extensions/browser/extension_system.h" 48 #include "extensions/browser/extension_system.h"
49 #include "extensions/common/extension_set.h" 49 #include "extensions/common/extension_set.h"
50 #include "google_apis/gaia/google_service_auth_error.h" 50 #include "google_apis/gaia/google_service_auth_error.h"
51 #include "grit/generated_resources.h" 51 #include "grit/generated_resources.h"
52 #include "net/base/escape.h" 52 #include "net/base/escape.h"
53 #include "ui/base/l10n/l10n_util.h" 53 #include "ui/base/l10n/l10n_util.h"
54 54
55 #if defined(OS_CHROMEOS) 55 #if defined(OS_CHROMEOS)
56 #include "chrome/browser/chromeos/login/supervised_user_manager.h" 56 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
57 #include "chrome/browser/chromeos/login/user_manager.h" 57 #include "chrome/browser/chromeos/login/users/user_manager.h"
58 #endif 58 #endif
59 59
60 using base::DictionaryValue; 60 using base::DictionaryValue;
61 using base::UserMetricsAction; 61 using base::UserMetricsAction;
62 using content::BrowserThread; 62 using content::BrowserThread;
63 63
64 const char kManagedUserAccessRequestKeyPrefix[] = 64 const char kManagedUserAccessRequestKeyPrefix[] =
65 "X-ManagedUser-AccessRequests"; 65 "X-ManagedUser-AccessRequests";
66 const char kManagedUserAccessRequestTime[] = "timestamp"; 66 const char kManagedUserAccessRequestTime[] = "timestamp";
67 const char kManagedUserName[] = "name"; 67 const char kManagedUserName[] = "name";
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 696
697 void ManagedUserService::OnBrowserSetLastActive(Browser* browser) { 697 void ManagedUserService::OnBrowserSetLastActive(Browser* browser) {
698 bool profile_became_active = profile_->IsSameProfile(browser->profile()); 698 bool profile_became_active = profile_->IsSameProfile(browser->profile());
699 if (!is_profile_active_ && profile_became_active) 699 if (!is_profile_active_ && profile_became_active)
700 content::RecordAction(UserMetricsAction("ManagedUsers_OpenProfile")); 700 content::RecordAction(UserMetricsAction("ManagedUsers_OpenProfile"));
701 else if (is_profile_active_ && !profile_became_active) 701 else if (is_profile_active_ && !profile_became_active)
702 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile")); 702 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile"));
703 703
704 is_profile_active_ = profile_became_active; 704 is_profile_active_ = profile_became_active;
705 } 705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698