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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2165643004: arc: add enterprise_reporting.mojom interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved ArcUserDataService to make calls to ArcAuthService Created 4 years, 5 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 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/chromeos/login/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 #include "base/threading/thread_task_runner_handle.h" 26 #include "base/threading/thread_task_runner_handle.h"
27 #include "base/threading/worker_pool.h" 27 #include "base/threading/worker_pool.h"
28 #include "chrome/browser/about_flags.h" 28 #include "chrome/browser/about_flags.h"
29 #include "chrome/browser/app_mode/app_mode_utils.h" 29 #include "chrome/browser/app_mode/app_mode_utils.h"
30 #include "chrome/browser/browser_process.h" 30 #include "chrome/browser/browser_process.h"
31 #include "chrome/browser/browser_process_platform_part_chromeos.h" 31 #include "chrome/browser/browser_process_platform_part_chromeos.h"
32 #include "chrome/browser/browser_shutdown.h" 32 #include "chrome/browser/browser_shutdown.h"
33 #include "chrome/browser/chrome_notification_types.h" 33 #include "chrome/browser/chrome_notification_types.h"
34 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 34 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
35 #include "chrome/browser/chromeos/arc/arc_auth_service.h" 35 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
36 #include "chrome/browser/chromeos/arc/arc_user_data_service.h"
36 #include "chrome/browser/chromeos/base/locale_util.h" 37 #include "chrome/browser/chromeos/base/locale_util.h"
37 #include "chrome/browser/chromeos/boot_times_recorder.h" 38 #include "chrome/browser/chromeos/boot_times_recorder.h"
38 #include "chrome/browser/chromeos/first_run/first_run.h" 39 #include "chrome/browser/chromeos/first_run/first_run.h"
39 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" 40 #include "chrome/browser/chromeos/first_run/goodies_displayer.h"
40 #include "chrome/browser/chromeos/input_method/input_method_util.h" 41 #include "chrome/browser/chromeos/input_method/input_method_util.h"
41 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" 42 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h"
42 #include "chrome/browser/chromeos/login/chrome_restart_request.h" 43 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
43 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 44 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
44 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 45 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
45 #include "chrome/browser/chromeos/login/existing_user_controller.h" 46 #include "chrome/browser/chromeos/login/existing_user_controller.h"
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 if (arc::ArcBridgeService::GetEnabled( 1161 if (arc::ArcBridgeService::GetEnabled(
1161 base::CommandLine::ForCurrentProcess())) { 1162 base::CommandLine::ForCurrentProcess())) {
1162 const AccountId& account_id = 1163 const AccountId& account_id =
1163 multi_user_util::GetAccountIdFromProfile(profile); 1164 multi_user_util::GetAccountIdFromProfile(profile);
1164 std::unique_ptr<BooleanPrefMember> arc_enabled_pref = 1165 std::unique_ptr<BooleanPrefMember> arc_enabled_pref =
1165 base::MakeUnique<BooleanPrefMember>(); 1166 base::MakeUnique<BooleanPrefMember>();
1166 arc_enabled_pref->Init(prefs::kArcEnabled, profile->GetPrefs()); 1167 arc_enabled_pref->Init(prefs::kArcEnabled, profile->GetPrefs());
1167 DCHECK(arc::ArcServiceManager::Get()); 1168 DCHECK(arc::ArcServiceManager::Get());
1168 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( 1169 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(
1169 account_id, std::move(arc_enabled_pref)); 1170 account_id, std::move(arc_enabled_pref));
1171 arc::ArcServiceManager::Get()->AddService(
1172 base::WrapUnique(new arc::ArcUserDataService(
Luis Héctor Chávez 2016/07/22 15:51:42 nit: prefer base::MakeUnique<T>(...) over base::Wr
Polina Bondarenko 2016/07/25 16:17:59 Removed.
1173 arc::ArcBridgeService::Get(), std::move(arc_enabled_pref),
1174 account_id)));
1170 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); 1175 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
1171 DCHECK(arc_auth_service); 1176 DCHECK(arc_auth_service);
1172 arc_auth_service->OnPrimaryUserProfilePrepared(profile); 1177 arc_auth_service->OnPrimaryUserProfilePrepared(profile);
1173 } 1178 }
1174 } 1179 }
1175 1180
1176 UpdateEasyUnlockKeys(user_context_); 1181 UpdateEasyUnlockKeys(user_context_);
1177 user_context_.ClearSecrets(); 1182 user_context_.ClearSecrets();
1178 if (TokenHandlesEnabled()) { 1183 if (TokenHandlesEnabled()) {
1179 CreateTokenUtilIfMissing(); 1184 CreateTokenUtilIfMissing();
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 ->browser_policy_connector_chromeos() 1898 ->browser_policy_connector_chromeos()
1894 ->IsEnterpriseManaged()) { 1899 ->IsEnterpriseManaged()) {
1895 return false; 1900 return false;
1896 } 1901 }
1897 1902
1898 // Do not show end of life notification if this is a guest session 1903 // Do not show end of life notification if this is a guest session
1899 return !profile->IsGuestSession(); 1904 return !profile->IsGuestSession();
1900 } 1905 }
1901 1906
1902 } // namespace chromeos 1907 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698