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

Side by Side Diff: chrome/browser/extensions/extension_system_impl.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/extensions/extension_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 rules_store_.reset(new StateStore( 113 rules_store_.reset(new StateStore(
114 profile_, 114 profile_,
115 profile_->GetPath().AppendASCII(extensions::kRulesStoreName), 115 profile_->GetPath().AppendASCII(extensions::kRulesStoreName),
116 false)); 116 false));
117 117
118 #if defined(OS_CHROMEOS) 118 #if defined(OS_CHROMEOS)
119 const user_manager::User* user = 119 const user_manager::User* user =
120 user_manager::UserManager::Get()->GetActiveUser(); 120 user_manager::UserManager::Get()->GetActiveUser();
121 policy::DeviceLocalAccount::Type device_local_account_type; 121 policy::DeviceLocalAccount::Type device_local_account_type;
122 if (user && policy::IsDeviceLocalAccountUser(user->email(), 122 if (user && policy::IsDeviceLocalAccountUser(user->GetUserID(),
123 &device_local_account_type)) { 123 &device_local_account_type)) {
124 device_local_account_management_policy_provider_.reset( 124 device_local_account_management_policy_provider_.reset(
125 new chromeos::DeviceLocalAccountManagementPolicyProvider( 125 new chromeos::DeviceLocalAccountManagementPolicyProvider(
126 device_local_account_type)); 126 device_local_account_type));
127 } 127 }
128 #endif // defined(OS_CHROMEOS) 128 #endif // defined(OS_CHROMEOS)
129 } 129 }
130 130
131 void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() { 131 void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() {
132 management_policy_->RegisterProviders( 132 management_policy_->RegisterProviders(
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 551 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
552 const std::string& extension_id, 552 const std::string& extension_id,
553 const UnloadedExtensionInfo::Reason reason) { 553 const UnloadedExtensionInfo::Reason reason) {
554 BrowserThread::PostTask( 554 BrowserThread::PostTask(
555 BrowserThread::IO, 555 BrowserThread::IO,
556 FROM_HERE, 556 FROM_HERE,
557 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 557 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
558 } 558 }
559 559
560 } // namespace extensions 560 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698