| Index: chrome/browser/ui/webui/options/managed_user_settings_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/managed_user_settings_handler.cc b/chrome/browser/ui/webui/options/managed_user_settings_handler.cc
|
| index 450ed7b8a8fee118ee65909c97322143f55b462c..5db7118e32214af07a2ee5fb0c400877c3c64640 100644
|
| --- a/chrome/browser/ui/webui/options/managed_user_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/managed_user_settings_handler.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/time.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/first_run/first_run.h"
|
| +#include "chrome/browser/managed_mode/managed_mode_navigation_observer.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -49,12 +50,24 @@ void ManagedUserSettingsHandler::InitializePage() {
|
| web_ui()->CallJavascriptFunction(
|
| "ManagedUserSettings.passphraseChanged",
|
| is_passphrase_set);
|
| + if ((first_run::IsChromeFirstRun() &&
|
| + !CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoFirstRun)) ||
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kResetLocalPassphrase)) {
|
| + ManagedModeNavigationObserver::FromWebContents(
|
| + web_ui()->GetWebContents())->set_elevated(true);
|
| + }
|
| }
|
| }
|
|
|
| void ManagedUserSettingsHandler::HandlePageOpened(const base::ListValue* args) {
|
| start_time_ = base::TimeTicks::Now();
|
| content::RecordAction(UserMetricsAction("ManagedMode_OpenSettings"));
|
| + if (ManagedModeNavigationObserver::FromWebContents(
|
| + web_ui()->GetWebContents())->is_elevated()) {
|
| + web_ui()->CallJavascriptFunction("ManagedUserSettings.isAuthenticated",
|
| + base::FundamentalValue(true));
|
| + }
|
| }
|
|
|
| void ManagedUserSettingsHandler::GetLocalizedValues(
|
|
|