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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service.cc

Issue 350183002: Rename "managed (mode|user)" to "supervised user" (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/supervised_user_service.h" 5 #include "chrome/browser/supervised_user/supervised_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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 const extensions::Extension* extension, 376 const extensions::Extension* extension,
377 base::string16* error) const { 377 base::string16* error) const {
378 // |extension| can be NULL in unit_tests. 378 // |extension| can be NULL in unit_tests.
379 if (!ProfileIsSupervised() || (extension && extension->is_theme())) 379 if (!ProfileIsSupervised() || (extension && extension->is_theme()))
380 return true; 380 return true;
381 381
382 if (elevated_for_testing_) 382 if (elevated_for_testing_)
383 return true; 383 return true;
384 384
385 if (error) 385 if (error)
386 *error = l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOCKED_MANAGED_USER); 386 *error = l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOCKED_SUPERVISED_USER);
387 return false; 387 return false;
388 } 388 }
389 389
390 ScopedVector<SupervisedUserSiteList> 390 ScopedVector<SupervisedUserSiteList>
391 SupervisedUserService::GetActiveSiteLists() { 391 SupervisedUserService::GetActiveSiteLists() {
392 ScopedVector<SupervisedUserSiteList> site_lists; 392 ScopedVector<SupervisedUserSiteList> site_lists;
393 ExtensionService* extension_service = 393 ExtensionService* extension_service =
394 extensions::ExtensionSystem::Get(profile_)->extension_service(); 394 extensions::ExtensionSystem::Get(profile_)->extension_service();
395 // Can be NULL in unit tests. 395 // Can be NULL in unit tests.
396 if (!extension_service) 396 if (!extension_service)
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 743
744 void SupervisedUserService::OnBrowserSetLastActive(Browser* browser) { 744 void SupervisedUserService::OnBrowserSetLastActive(Browser* browser) {
745 bool profile_became_active = profile_->IsSameProfile(browser->profile()); 745 bool profile_became_active = profile_->IsSameProfile(browser->profile());
746 if (!is_profile_active_ && profile_became_active) 746 if (!is_profile_active_ && profile_became_active)
747 content::RecordAction(UserMetricsAction("ManagedUsers_OpenProfile")); 747 content::RecordAction(UserMetricsAction("ManagedUsers_OpenProfile"));
748 else if (is_profile_active_ && !profile_became_active) 748 else if (is_profile_active_ && !profile_became_active)
749 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile")); 749 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile"));
750 750
751 is_profile_active_ = profile_became_active; 751 is_profile_active_ = profile_became_active;
752 } 752 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698