diff options
author | akuegel@chromium.org <akuegel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-20 11:15:20 +0000 |
---|---|---|
committer | akuegel@chromium.org <akuegel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-20 11:15:20 +0000 |
commit | bb25b4066cc38ddb2da6c04e3d07bf9162f53f18 (patch) | |
tree | f9027896a46b1f0f363a218703528b93183a2017 /chrome | |
parent | b32da81ecbc4097f3ea29771fe293ae8e0c7f189 (diff) | |
download | chromium_src-bb25b4066cc38ddb2da6c04e3d07bf9162f53f18.zip chromium_src-bb25b4066cc38ddb2da6c04e3d07bf9162f53f18.tar.gz chromium_src-bb25b4066cc38ddb2da6c04e3d07bf9162f53f18.tar.bz2 |
Add a passphrase dialog for managed user accounts.
This changelist is an extract from this changelist:
https://codereview.chromium.org/11783008/
This dialog will be displayed whenever the user wants to access something which
should only be accessible to the manager of the managed account. This
changelist just introduces the dialog without actually using it somewhere,
the tests for this dialog will be added in another changelist.
A screenshot of this dialog can be found here:
https://docs.google.com/a/google.com/drawings/d/1ZSy4TH1k-nOwgza8G-sHc_z_n6-yIzkp7sdHD20ylM4/edit?usp=sharing
BUG=171370
TEST=It compiles.
Review URL: https://chromiumcodereview.appspot.com/12218118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 17 | ||||
-rw-r--r-- | chrome/browser/browser_resources.grd | 4 | ||||
-rw-r--r-- | chrome/browser/managed_mode/managed_user_service.cc | 10 | ||||
-rw-r--r-- | chrome/browser/managed_mode/managed_user_service.h | 3 | ||||
-rw-r--r-- | chrome/browser/managed_mode/managed_user_service_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/resources/managed_user_passphrase_dialog.css | 36 | ||||
-rw-r--r-- | chrome/browser/resources/managed_user_passphrase_dialog.html | 45 | ||||
-rw-r--r-- | chrome/browser/resources/managed_user_passphrase_dialog.js | 28 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/managed_user_passphrase_dialog.cc | 181 | ||||
-rw-r--r-- | chrome/browser/ui/webui/managed_user_passphrase_dialog.h | 64 | ||||
-rw-r--r-- | chrome/chrome_browser_ui.gypi | 2 | ||||
-rw-r--r-- | chrome/common/url_constants.cc | 3 | ||||
-rw-r--r-- | chrome/common/url_constants.h | 2 |
14 files changed, 396 insertions, 3 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index e0ba189..12a8c5d 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -8240,6 +8240,23 @@ The following plug-in is unresponsive: <ph name="PLUGIN_NAME">$1 Clearing... </message> + <!--Managed mode passphrase dialog data --> + <message name="IDS_PASSPHRASE_TITLE" desc="A title for the passphrase page to unlock managed user settings."> + Unlock + </message> + <message name="IDS_PASSPHRASE_INSTRUCTION" desc="Instruction to enter an unlock passphrase to unlock a page not accessible to the managed user."> + Enter passphrase to unlock and make changes. + </message> + <message name="IDS_UNLOCK_PASSPHRASE_BUTTON" desc="A button for unlocking the managed user settings page."> + Unlock + </message> + <message name="IDS_FORGOT_PASSPHRASE" desc="A link to recover forgotten passphrase."> + Forgot passphrase? + </message> + <message name="IDS_INCORRECT_PASSPHRASE_WARNING" desc="A warning for the passphrase page if the incorrect passphrase was entered."> + The passphrase you entered is incorrect. + </message> + <!-- Managed User Settings dialog data --> <message name="IDS_MANAGED_USER_SETTINGS_TITLE" desc="Title for the Managed User Settings dialog"> Managed User Settings diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index f06a0db..464f8ef 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -314,6 +314,10 @@ <include name="IDR_SET_AS_DEFAULT_BROWSER_HTML" file="resources\set_as_default_browser.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> </if> <include name="IDR_MANAGED_MODE_BLOCK_INTERSTITIAL_HTML" file="resources\managed_mode_block_interstitial.html" flattenhtml="true" type="BINDATA" /> + <include name="IDR_MANAGED_USER_PASSPHRASE_DIALOG_HTML" file="resources\managed_user_passphrase_dialog.html" allowexternalscript="true" type="chrome_html" /> + <include name="IDR_MANAGED_USER_PASSPHRASE_DIALOG_JS" file="resources\managed_user_passphrase_dialog.js" type="BINDATA" /> + <include name="IDR_MANAGED_USER_PASSPHRASE_DIALOG_CSS" file="resources\managed_user_passphrase_dialog.css" type="BINDATA" /> + <include name="IDR_MANAGED_USER_PASSPHRASE_DIALOG_IMG" file="resources\options\managed_user.png" type="BINDATA" /> <include name="IDR_PROFILE_SIGNIN_CONFIRMATION_HTML" file="resources\profile_signin_confirmation.html" type="BINDATA" /> <include name="IDR_PROFILE_SIGNIN_CONFIRMATION_JS" file="resources\profile_signin_confirmation.js" type="BINDATA" /> </includes> diff --git a/chrome/browser/managed_mode/managed_user_service.cc b/chrome/browser/managed_mode/managed_user_service.cc index b3261fd..194c18f 100644 --- a/chrome/browser/managed_mode/managed_user_service.cc +++ b/chrome/browser/managed_mode/managed_user_service.cc @@ -97,6 +97,14 @@ bool ManagedUserService::ProfileIsManaged() const { return profile_->GetPrefs()->GetBoolean(prefs::kProfileIsManaged); } +bool ManagedUserService::IsElevated() const { + PrefService* pref_service = profile_->GetPrefs(); + // If there is no passphrase set, the profile is considered to be elevated. + if (pref_service->GetString(prefs::kManagedModeLocalPassphrase).empty()) + return true; + return is_elevated_; +} + // static void ManagedUserService::RegisterUserPrefs(PrefRegistrySyncable* registry) { registry->RegisterDictionaryPref(prefs::kManagedModeManualHosts, @@ -331,7 +339,7 @@ void ManagedUserService::SetManualBehaviorForURLs(const std::vector<GURL>& urls, UpdateManualURLs(); } -void ManagedUserService::SetElevatedForTesting(bool is_elevated) { +void ManagedUserService::SetElevated(bool is_elevated) { is_elevated_ = is_elevated; } diff --git a/chrome/browser/managed_mode/managed_user_service.h b/chrome/browser/managed_mode/managed_user_service.h index 31fc53b..bf8c20f 100644 --- a/chrome/browser/managed_mode/managed_user_service.h +++ b/chrome/browser/managed_mode/managed_user_service.h @@ -39,6 +39,7 @@ class ManagedUserService : public ProfileKeyedService, virtual ~ManagedUserService(); bool ProfileIsManaged() const; + bool IsElevated() const; static void RegisterUserPrefs(PrefRegistrySyncable* registry); @@ -76,7 +77,7 @@ class ManagedUserService : public ProfileKeyedService, void SetManualBehaviorForURLs(const std::vector<GURL>& url, ManualBehavior behavior); - void SetElevatedForTesting(bool is_elevated); + void SetElevated(bool is_elevated); // Initializes this object. This method does nothing if the profile is not // managed. diff --git a/chrome/browser/managed_mode/managed_user_service_unittest.cc b/chrome/browser/managed_mode/managed_user_service_unittest.cc index 805d3c7..bcecd60 100644 --- a/chrome/browser/managed_mode/managed_user_service_unittest.cc +++ b/chrome/browser/managed_mode/managed_user_service_unittest.cc @@ -128,7 +128,7 @@ TEST_F(ManagedUserServiceExtensionTest, InstallContentPacks) { profile_->GetPrefs()->SetBoolean(prefs::kProfileIsManaged, true); ManagedUserService managed_user_service(profile_.get()); managed_user_service.Init(); - managed_user_service.SetElevatedForTesting(true); + managed_user_service.SetElevated(true); ManagedModeURLFilter* url_filter = managed_user_service.GetURLFilterForUIThread(); ManagedModeURLFilterObserver observer(url_filter); diff --git a/chrome/browser/resources/managed_user_passphrase_dialog.css b/chrome/browser/resources/managed_user_passphrase_dialog.css new file mode 100644 index 0000000..745b096 --- /dev/null +++ b/chrome/browser/resources/managed_user_passphrase_dialog.css @@ -0,0 +1,36 @@ +/* Copyright (c) 2013 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +#managed-mode-passphrase-page { + min-width: 350px; +} + +#managed-user-logo { + background-image: url('managed_user.png'); + height: 68px; + width: 65px; +} + +#instructions, +#entry, +#incorrect-passphrase-warning { + padding: 5px 15px; +} + +#buttons { + float: right; +} + +html[dir=rtl] #buttons { + float: left; +} + +#buttons { + padding: 15px 15px; +} + +#incorrect-passphrase-warning { + color: red; + font-weight: bold; +} diff --git a/chrome/browser/resources/managed_user_passphrase_dialog.html b/chrome/browser/resources/managed_user_passphrase_dialog.html new file mode 100644 index 0000000..c3912b9 --- /dev/null +++ b/chrome/browser/resources/managed_user_passphrase_dialog.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<!-- Copyright (c) 2013 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. --> +<html i18n-values="dir:textdirection"> +<head> + <link rel="stylesheet" href="shared/css/chrome_shared.css"> + <link rel="stylesheet" href="dialog.css"> + <link rel="stylesheet" href="managed_user_passphrase_dialog.css"> + <script src="chrome://resources/js/load_time_data.js"></script> + <script src="chrome://resources/js/util.js"></script> + <script src="managed_user_passphrase_dialog.js"></script> + <script src="strings.js"></script> +</head> +<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> + <div id="managed-mode-passphrase-page" class="page"> + <div id="managed-user-logo"></div> + <h1 i18n-content="managedModePassphrasePage"></h1> + <div class="content-area"> + <div id="instructions"> + <label> + <span i18n-content="passphraseInstruction"></span> + </label> + </div> + <div id="entry"> + <input id="passphrase-entry" size="50" type="password" required> + </div> + <div id="buttons"> + <button id="cancel-passphrase-button" + i18n-content="cancelPassphraseButton"> + </button> + <button id="unlock-passphrase-button" + i18n-content="unlockPassphraseButton" disabled> + </button> + </div> + <div id="incorrect-passphrase-warning" hidden> + <label> + <span i18n-content="incorrectPassphraseWarning"></span> + </label> + </div> + </div> + </div> + <script src="chrome://resources/js/i18n_template2.js"></script> +</body> +</html> diff --git a/chrome/browser/resources/managed_user_passphrase_dialog.js b/chrome/browser/resources/managed_user_passphrase_dialog.js new file mode 100644 index 0000000..862f0fc --- /dev/null +++ b/chrome/browser/resources/managed_user_passphrase_dialog.js @@ -0,0 +1,28 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +function load() { + $('unlock-passphrase-button').onclick = function(event) { + chrome.send('checkPassphrase', [$('passphrase-entry').value]); + }; + $('cancel-passphrase-button').onclick = function(event) { + // TODO(akuegel): Replace by closeDialog. + chrome.send('DialogClose'); + }; + $('passphrase-entry').oninput = function(event) { + $('unlock-passphrase-button').disabled = $('passphrase-entry').value == ''; + $('incorrect-passphrase-warning').hidden = true; + }; +} + +function passphraseCorrect() { + chrome.send('DialogClose', ['true']); +} + +function passphraseIncorrect() { + $('incorrect-passphrase-warning').hidden = false; + $('passphrase-entry').focus(); +} + +window.addEventListener('DOMContentLoaded', load); diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 36bdf5d..5f622e2 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc @@ -208,6 +208,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI<InstantUI>; if (url.host() == chrome::kChromeUILocalOmniboxPopupHost) return &NewWebUI<LocalOmniboxPopupUI>; + if (url.host() == chrome::kChromeUIManagedUserPassphrasePageHost) + return &NewWebUI<ConstrainedWebDialogUI>; if (url.host() == chrome::kChromeUIMemoryInternalsHost && CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableMemoryInternalsUI)) { diff --git a/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc b/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc new file mode 100644 index 0000000..e5f1eae --- /dev/null +++ b/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc @@ -0,0 +1,181 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/managed_user_passphrase_dialog.h" + +#include <string> +#include <vector> + +#include "base/bind.h" +#include "base/memory/weak_ptr.h" +#include "base/prefs/pref_service.h" +#include "base/values.h" +#include "chrome/browser/managed_mode/managed_user_passphrase.h" +#include "chrome/browser/managed_mode/managed_user_service.h" +#include "chrome/browser/managed_mode/managed_user_service_factory.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" +#include "chrome/common/pref_names.h" +#include "chrome/common/url_constants.h" +#include "content/public/browser/web_contents.h" +#include "content/public/browser/web_ui_data_source.h" +#include "content/public/browser/web_ui_message_handler.h" +#include "grit/browser_resources.h" +#include "grit/generated_resources.h" +#include "ui/gfx/size.h" + +namespace { + +// Handles the message when the user entered a passphrase and clicks the Unlock +// button. +class ManagedUserPassphraseDialogMessageHandler + : public content::WebUIMessageHandler { + + public: + ManagedUserPassphraseDialogMessageHandler(); + virtual ~ManagedUserPassphraseDialogMessageHandler() {} + + // content::WebUIMessageHandler implementation. + virtual void RegisterMessages() OVERRIDE; + + private: + // Gets called from the UI with the entered passphrase as a parameter. The + // correctness of the passphrase is checked and the result is returned to the + // UI. + void CheckPassphrase(const base::ListValue* args) const; + + base::WeakPtrFactory<ManagedUserPassphraseDialogMessageHandler> weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseDialogMessageHandler); +}; + +ManagedUserPassphraseDialogMessageHandler + ::ManagedUserPassphraseDialogMessageHandler() : weak_factory_(this) { +} + +void ManagedUserPassphraseDialogMessageHandler::RegisterMessages() { + web_ui()->RegisterMessageCallback( + "checkPassphrase", + base::Bind(&ManagedUserPassphraseDialogMessageHandler::CheckPassphrase, + weak_factory_.GetWeakPtr())); +} + +void ManagedUserPassphraseDialogMessageHandler::CheckPassphrase( + const base::ListValue* args) const { + // Extract the passphrase from the provided ListValue parameter. + const base::Value* passphrase_arg = NULL; + args->Get(0, &passphrase_arg); + std::string passphrase; + passphrase_arg->GetAsString(&passphrase); + + // Get the hashed passphrase and the salt that was used to calculate it. + Profile* profile = Profile::FromWebUI(web_ui()); + PrefService* pref_service = profile->GetPrefs(); + std::string stored_passphrase_hash = + pref_service->GetString(prefs::kManagedModeLocalPassphrase); + std::string salt = pref_service->GetString(prefs::kManagedModeLocalSalt); + + // Calculate the hash of the entered passphrase. + ManagedUserPassphrase passphrase_key_generator(salt); + std::string encoded_passphrase_hash; + passphrase_key_generator.GenerateHashFromPassphrase(passphrase, + &encoded_passphrase_hash); + + // Check if the entered passphrase is correct and possibly set the managed + // user into the elevated state which for example allows to modify settings. + ManagedUserService* managed_user_service = + ManagedUserServiceFactory::GetForProfile(profile); + if (stored_passphrase_hash == encoded_passphrase_hash) { + managed_user_service->SetElevated(true); + web_ui()->CallJavascriptFunction("passphraseCorrect"); + } else { + managed_user_service->SetElevated(false); + web_ui()->CallJavascriptFunction("passphraseIncorrect"); + } +} + +} // namespace + +ManagedUserPassphraseDialog::ManagedUserPassphraseDialog( + content::WebContents* web_contents, + const PassphraseCheckedCallback& callback) : callback_(callback) { + Profile* profile = + Profile::FromBrowserContext(web_contents->GetBrowserContext()); + CreateDataSource(profile); + CreateConstrainedWebDialog(profile, this, NULL, web_contents); +} + + +ui::ModalType ManagedUserPassphraseDialog::GetDialogModalType() const { + return ui::MODAL_TYPE_WINDOW; +} + +string16 ManagedUserPassphraseDialog::GetDialogTitle() const { + return string16(); +} + +GURL ManagedUserPassphraseDialog::GetDialogContentURL() const { + return GURL(chrome::kChromeUIManagedUserPassphrasePageURL); +} + +void ManagedUserPassphraseDialog::GetWebUIMessageHandlers( + std::vector<content::WebUIMessageHandler*>* handlers) const { + DCHECK(handlers); + // The constrained window delegate takes care of registering the handler. + // The handler is also deleted automatically. + handlers->push_back(new ManagedUserPassphraseDialogMessageHandler()); +} + +void ManagedUserPassphraseDialog::GetDialogSize(gfx::Size* size) const { + const int kDialogWidth = 400; + const int kDialogHeight = 310; + size->SetSize(kDialogWidth, kDialogHeight); +} + +std::string ManagedUserPassphraseDialog::GetDialogArgs() const { + return std::string(); +} + +void ManagedUserPassphraseDialog::OnDialogClosed( + const std::string& json_retval) { + if (!callback_.is_null()) { + callback_.Run(!json_retval.empty()); + callback_.Reset(); + } +} + +void ManagedUserPassphraseDialog::OnCloseContents( + content::WebContents* source, bool* out_close_dialog) { +} + +bool ManagedUserPassphraseDialog::ShouldShowDialogTitle() const { + return false; +} + +ManagedUserPassphraseDialog::~ManagedUserPassphraseDialog() { +} + +void ManagedUserPassphraseDialog::CreateDataSource(Profile* profile) const { + content::WebUIDataSource* data_source = content::WebUIDataSource::Create( + chrome::kChromeUIManagedUserPassphrasePageHost); + data_source->SetDefaultResource(IDR_MANAGED_USER_PASSPHRASE_DIALOG_HTML); + data_source->AddResourcePath("managed_user_passphrase_dialog.js", + IDR_MANAGED_USER_PASSPHRASE_DIALOG_JS); + data_source->AddResourcePath("managed_user_passphrase_dialog.css", + IDR_MANAGED_USER_PASSPHRASE_DIALOG_CSS); + data_source->AddResourcePath("managed_user.png", + IDR_MANAGED_USER_PASSPHRASE_DIALOG_IMG); + data_source->AddLocalizedString("managedModePassphrasePage", + IDS_PASSPHRASE_TITLE); + data_source->AddLocalizedString("unlockPassphraseButton", + IDS_UNLOCK_PASSPHRASE_BUTTON); + data_source->AddLocalizedString("passphraseInstruction", + IDS_PASSPHRASE_INSTRUCTION); + data_source->AddLocalizedString("incorrectPassphraseWarning", + IDS_INCORRECT_PASSPHRASE_WARNING); + data_source->AddLocalizedString("cancelPassphraseButton", IDS_CANCEL); + data_source->SetJsonPath("strings.js"); + data_source->SetUseJsonJSFormatV2(); + content::WebUIDataSource::Add(profile, data_source); +} diff --git a/chrome/browser/ui/webui/managed_user_passphrase_dialog.h b/chrome/browser/ui/webui/managed_user_passphrase_dialog.h new file mode 100644 index 0000000..5b0c7f0 --- /dev/null +++ b/chrome/browser/ui/webui/managed_user_passphrase_dialog.h @@ -0,0 +1,64 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_MANAGED_USER_PASSPHRASE_DIALOG_H_ +#define CHROME_BROWSER_UI_WEBUI_MANAGED_USER_PASSPHRASE_DIALOG_H_ + +#include "base/basictypes.h" +#include "base/callback.h" +#include "base/compiler_specific.h" +#include "ui/web_dialogs/web_dialog_delegate.h" + +class ConstrainedWebDialogDelegate; +class Profile; + +namespace content { +class WebContents; +} + +namespace base { +class Value; +} + +// Called on the UI thread after the Passphrase Dialog was closed. A boolean +// flag is passed which indicates if the authentication was successful or not. +typedef base::Callback<void(bool)> PassphraseCheckedCallback; + +// Displays a tab-modal dialog, i.e. a dialog that will block the current page +// but still allow the user to switch to a different page. +// To display the dialog, allocate this object on the heap. It will open the +// dialog from its constructor and then delete itself when the user dismisses +// the dialog. +class ManagedUserPassphraseDialog : public ui::WebDialogDelegate { + public: + // Creates a passphrase dialog which will be deleted automatically when the + // user closes the dialog. + ManagedUserPassphraseDialog(content::WebContents* web_contents, + const PassphraseCheckedCallback& callback); + + // ui::WebDialogDelegate implementation. + virtual ui::ModalType GetDialogModalType() const OVERRIDE; + virtual string16 GetDialogTitle() const OVERRIDE; + virtual GURL GetDialogContentURL() const OVERRIDE; + virtual void GetWebUIMessageHandlers( + std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; + virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; + virtual std::string GetDialogArgs() const OVERRIDE; + virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; + virtual void OnCloseContents(content::WebContents* source, + bool* out_close_dialog) OVERRIDE; + virtual bool ShouldShowDialogTitle() const OVERRIDE; + + private: + virtual ~ManagedUserPassphraseDialog(); + + // Creates and initializes the WebUIDataSource which is used for this dialog. + void CreateDataSource(Profile* profile) const; + + PassphraseCheckedCallback callback_; + + DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseDialog); +}; + +#endif // CHROME_BROWSER_UI_WEBUI_MANAGED_USER_PASSPHRASE_DIALOG_H_ diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 2011cf2..b49d2be 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -1942,6 +1942,8 @@ 'browser/ui/webui/inspect_ui.h', 'browser/ui/webui/instant_ui.cc', 'browser/ui/webui/instant_ui.h', + 'browser/ui/webui/managed_user_passphrase_dialog.cc', + 'browser/ui/webui/managed_user_passphrase_dialog.h', 'browser/ui/webui/memory_internals/memory_internals_ui.cc', 'browser/ui/webui/memory_internals/memory_internals_ui.h', 'browser/ui/webui/metrics_handler.cc', diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index d58e363..0e4c11a 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc @@ -47,6 +47,8 @@ const char kChromeUIInspectURL[] = "chrome://inspect/"; const char kChromeUIInstantURL[] = "chrome://instant/"; const char kChromeUIIPCURL[] = "chrome://ipc/"; const char kChromeUIKeyboardURL[] = "chrome://keyboard/"; +const char kChromeUIManagedUserPassphrasePageURL[] = + "chrome://managed-user-passphrase/"; const char kChromeUIMemoryRedirectURL[] = "chrome://memory-redirect/"; const char kChromeUIMemoryURL[] = "chrome://memory/"; const char kChromeUIMetroFlowURL[] = "chrome://make-metro/"; @@ -164,6 +166,7 @@ const char kChromeUIIPCHost[] = "ipc"; const char kChromeUIKeyboardHost[] = "keyboard"; const char kChromeUIKillHost[] = "kill"; const char kChromeUILocalOmniboxPopupHost[] = "local-omnibox-popup"; +const char kChromeUIManagedUserPassphrasePageHost[] = "managed-user-passphrase"; const char kChromeUIMemoryHost[] = "memory"; const char kChromeUIMemoryInternalsHost[] = "memory-internals"; const char kChromeUIMemoryRedirectHost[] = "memory-redirect"; diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index 934fbaa..cd7c54f 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -46,6 +46,7 @@ extern const char kChromeUIInspectURL[]; extern const char kChromeUIInstantURL[]; extern const char kChromeUIIPCURL[]; extern const char kChromeUIKeyboardURL[]; +extern const char kChromeUIManagedUserPassphrasePageURL[]; extern const char kChromeUIMemoryRedirectURL[]; extern const char kChromeUIMemoryURL[]; extern const char kChromeUIMetroFlowURL[]; @@ -158,6 +159,7 @@ extern const char kChromeUIIPCHost[]; extern const char kChromeUIKeyboardHost[]; extern const char kChromeUIKillHost[]; extern const char kChromeUILocalOmniboxPopupHost[]; +extern const char kChromeUIManagedUserPassphrasePageHost[]; extern const char kChromeUIMemoryHost[]; extern const char kChromeUIMemoryInternalsHost[]; extern const char kChromeUIMemoryRedirectHost[]; |