summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakuegel@chromium.org <akuegel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-28 14:12:56 +0000
committerakuegel@chromium.org <akuegel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-28 14:12:56 +0000
commit122c31f02a3fc3536d1e2b02360d6d3b389089c4 (patch)
tree8bab1e95b8fbc233e824aa76c839dd450cb8856b
parentf11929b8a1d1f22767957c5131f9869f6380960d (diff)
downloadchromium_src-122c31f02a3fc3536d1e2b02360d6d3b389089c4.zip
chromium_src-122c31f02a3fc3536d1e2b02360d6d3b389089c4.tar.gz
chromium_src-122c31f02a3fc3536d1e2b02360d6d3b389089c4.tar.bz2
Fix bug with managed user passphrase dialog not showing under windows.
Currently the html default resource for this dialog could not be found when the WebUIDataSource requested it. Moving the html resource from includes to structures should make it work. The added DCHECK makes sure to catch the error in a browser_test. BUG=171370 TEST=Manual,browser_tests Review URL: https://chromiumcodereview.appspot.com/12334121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185240 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_resources.grd4
-rw-r--r--chrome/browser/resources/managed_user_passphrase_dialog.css2
-rw-r--r--chrome/browser/resources/managed_user_passphrase_dialog.html8
-rw-r--r--chrome/browser/ui/webui/managed_user_passphrase_dialog.cc9
4 files changed, 11 insertions, 12 deletions
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index 5f4e428..70b53a2 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -55,6 +55,7 @@
<structure name="IDR_READER_OUT_OF_DATE_HTML" file="resources\reader_out_of_date.html" flattenhtml="true" type="chrome_html" />
<structure name="IDR_SSL_ROAD_BLOCK_HTML" file="resources\ssl_roadblock.html" flattenhtml="true" type="chrome_html" />
<structure name="IDR_SAFE_BROWSING_MALWARE_BLOCK_V2" file="resources\safe_browsing\malware_block_v2.html" flattenhtml="true" type="chrome_html" />
+ <structure name="IDR_MANAGED_USER_PASSPHRASE_DIALOG_HTML" file="resources\managed_user_passphrase_dialog.html" flattenhtml="true" type="chrome_html" />
</structures>
<includes>
<if expr="is_win">
@@ -321,10 +322,7 @@
<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/resources/managed_user_passphrase_dialog.css b/chrome/browser/resources/managed_user_passphrase_dialog.css
index 745b096..64922c4 100644
--- a/chrome/browser/resources/managed_user_passphrase_dialog.css
+++ b/chrome/browser/resources/managed_user_passphrase_dialog.css
@@ -7,7 +7,7 @@
}
#managed-user-logo {
- background-image: url('managed_user.png');
+ background-image: url('options/managed_user.png');
height: 68px;
width: 65px;
}
diff --git a/chrome/browser/resources/managed_user_passphrase_dialog.html b/chrome/browser/resources/managed_user_passphrase_dialog.html
index c3912b9..7584823 100644
--- a/chrome/browser/resources/managed_user_passphrase_dialog.html
+++ b/chrome/browser/resources/managed_user_passphrase_dialog.html
@@ -4,13 +4,13 @@
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>
+ <script src="chrome://managed-user-passphrase/strings.js"></script>
+ <script
+ src="chrome://managed-user-passphrase/managed_user_passphrase_dialog.js">
+ </script>
</head>
<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div id="managed-mode-passphrase-page" class="page">
diff --git a/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc b/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc
index e5f1eae..88e777e 100644
--- a/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc
+++ b/chrome/browser/ui/webui/managed_user_passphrase_dialog.cc
@@ -23,6 +23,7 @@
#include "content/public/browser/web_ui_message_handler.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/size.h"
namespace {
@@ -160,12 +161,12 @@ void ManagedUserPassphraseDialog::CreateDataSource(Profile* profile) const {
content::WebUIDataSource* data_source = content::WebUIDataSource::Create(
chrome::kChromeUIManagedUserPassphrasePageHost);
data_source->SetDefaultResource(IDR_MANAGED_USER_PASSPHRASE_DIALOG_HTML);
+ // DCHECK to uncover if the passphrase dialog can actually load and display
+ // the html resource when running a browser test.
+ DCHECK(ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
+ 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",