| Index: chrome/browser/views/cookie_prompt_view.cc
|
| ===================================================================
|
| --- chrome/browser/views/cookie_prompt_view.cc (revision 38820)
|
| +++ chrome/browser/views/cookie_prompt_view.cc (working copy)
|
| @@ -42,7 +42,7 @@
|
| gfx::NativeWindow root_window,
|
| Profile* profile,
|
| const BrowsingDataLocalStorageHelper::LocalStorageInfo& storage_info,
|
| - const std::string& host,
|
| + const GURL& url,
|
| const std::string& cookie_line,
|
| CookiePromptModalDialogDelegate* delegate,
|
| bool cookie_ui)
|
| @@ -58,11 +58,11 @@
|
| cookie_ui_(cookie_ui),
|
| parent_(parent),
|
| root_window_(root_window),
|
| - host_(host),
|
| + url_(url),
|
| cookie_line_(cookie_line),
|
| local_storage_info_(storage_info),
|
| delegate_(delegate) {
|
| - InitializeViewResources(host);
|
| + InitializeViewResources();
|
| expanded_view_ = g_browser_process->local_state()->
|
| GetBoolean(prefs::kCookiePromptExpanded);
|
| }
|
| @@ -242,7 +242,7 @@
|
| layout->AddView(cookie_info_view, 1, 1, GridLayout::FILL,
|
| GridLayout::CENTER);
|
|
|
| - cookie_info_view->SetCookieString(host_, cookie_line_);
|
| + cookie_info_view->SetCookieString(url_, cookie_line_);
|
| info_view_ = cookie_info_view;
|
| } else {
|
| LocalStorageInfoView* local_storage_info_view = new LocalStorageInfoView();
|
| @@ -282,9 +282,8 @@
|
| window->SetBounds(bounds, NULL);
|
| }
|
|
|
| -void CookiePromptView::InitializeViewResources(const std::string& host) {
|
| - DCHECK(host.empty() || host[0] != '.');
|
| - host_ = host;
|
| +void CookiePromptView::InitializeViewResources() {
|
| + host_ = cookie_ui_ ? url_.host() : local_storage_info_.host;
|
| title_ = l10n_util::GetStringF(
|
| cookie_ui_ ? IDS_COOKIE_ALERT_TITLE : IDS_DATA_ALERT_TITLE,
|
| UTF8ToWide(host_));
|
|
|