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

Unified Diff: components/arc/net/arc_net_host_impl.cc

Issue 2756443003: arc: Update device owner check implementation (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« components/arc/net/DEPS ('K') | « components/arc/net/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/net/arc_net_host_impl.cc
diff --git a/components/arc/net/arc_net_host_impl.cc b/components/arc/net/arc_net_host_impl.cc
index b6f497d0b1902e9d9fb5863bf5c1a9ddbbb7af7c..1977a8f0ea9b2c382bd0153a022f7bd394847667 100644
--- a/components/arc/net/arc_net_host_impl.cc
+++ b/components/arc/net/arc_net_host_impl.cc
@@ -14,6 +14,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
#include "chromeos/login/login_state.h"
#include "chromeos/network/managed_network_configuration_handler.h"
#include "chromeos/network/network_connection_handler.h"
@@ -45,8 +46,8 @@ chromeos::NetworkConnectionHandler* GetNetworkConnectionHandler() {
bool IsDeviceOwner() {
// Check whether the logged-in Chrome OS user is allowed to add or
// remove WiFi networks.
- return chromeos::LoginState::Get()->GetLoggedInUserType() ==
- chromeos::LoginState::LOGGED_IN_USER_OWNER;
+ return chromeos::ChromeUserManager::Get()->GetOwnerAccountId() ==
+ chromeos::ChromeUserManager::Get()->GetActiveUser()->GetAccountId();
xiyuan 2017/03/16 05:13:21 I don't think this helps. GetOwnerAccountId() also
xiyuan 2017/03/16 17:14:51 Per discussion with abhishekbh@, the LoginState co
}
std::string GetStringFromOncDictionary(const base::DictionaryValue* dict,
« components/arc/net/DEPS ('K') | « components/arc/net/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698