Chromium Code Reviews| Index: chrome/browser/chromeos/profiles/profile_helper.cc |
| diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc |
| index 419807c197d9463efd4cd10588c3182055dfd8d1..11802a0ceaa5b0700825940694199fdd5bd05f92 100644 |
| --- a/chrome/browser/chromeos/profiles/profile_helper.cc |
| +++ b/chrome/browser/chromeos/profiles/profile_helper.cc |
| @@ -9,6 +9,7 @@ |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" |
| +#include "chrome/browser/chromeos/login/user.h" |
| #include "chrome/browser/chromeos/login/user_manager.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| @@ -115,6 +116,13 @@ bool ProfileHelper::IsSigninProfile(Profile* profile) { |
| return profile->GetPath().BaseName().value() == chrome::kInitialProfile; |
| } |
| +// static |
| +bool ProfileHelper::IsProfileOwner(Profile* profile) { |
| + chromeos::UserManager* mgr = chromeos::UserManager::Get(); |
| + chromeos::User* usr = mgr->GetUserByProfile(profile); |
| + return usr->email() == mgr->GetOwnerEmail(); |
|
dzhioev (left Google)
2014/01/23 13:25:08
Please use words instead of abbreviations.
ygorshenin1
2014/01/27 09:13:14
Done.
|
| +} |
| + |
| void ProfileHelper::ProfileStartup(Profile* profile, bool process_startup) { |
| // Initialize Chrome OS preferences like touch pad sensitivity. For the |
| // preferences to work in the guest mode, the initialization has to be |