Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1633)

Unified Diff: chrome/browser/views/cookie_info_view.cc

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/cookie_info_view.h ('k') | chrome/browser/views/cookie_prompt_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/cookie_info_view.cc
===================================================================
--- chrome/browser/views/cookie_info_view.cc (revision 38222)
+++ chrome/browser/views/cookie_info_view.cc (working copy)
@@ -89,7 +89,42 @@
Layout();
}
+void CookieInfoView::SetCookieString(
+ const std::string& domain,
+ const net::CookieMonster::ParsedCookie& cookie) {
+ name_value_field_->SetText(UTF8ToWide(cookie.Name()));
+ content_value_field_->SetText(UTF8ToWide(cookie.Value()));
+ domain_value_field_->SetText(UTF8ToWide(domain));
+ path_value_field_->SetText(UTF8ToWide(cookie.Path()));
+ created_value_field_->SetText(
+ base::TimeFormatFriendlyDateAndTime(base::Time::Now()));
+ std::wstring expire_text = cookie.HasExpires() ?
+ base::TimeFormatFriendlyDateAndTime(
+ net::CookieMonster::ParseCookieTime(cookie.Expires())) :
+ l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_SESSION);
+
+ if (editable_expiration_date_) {
+ expire_combo_values_.clear();
+ if (cookie.HasExpires())
+ expire_combo_values_.push_back(expire_text);
+ expire_combo_values_.push_back(
+ l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_SESSION));
+ expires_value_combobox_->ModelChanged();
+ expires_value_combobox_->SetSelectedItem(0);
+ expires_value_combobox_->SetEnabled(true);
+ } else {
+ expires_value_field_->SetText(expire_text);
+ }
+
+ send_for_value_field_->SetText(cookie.IsSecure() ?
+ l10n_util::GetString(IDS_COOKIES_COOKIE_SENDFOR_SECURE) :
+ l10n_util::GetString(IDS_COOKIES_COOKIE_SENDFOR_ANY));
+ EnableCookieDisplay(true);
+ Layout();
+}
+
+
void CookieInfoView::ClearCookieDisplay() {
std::wstring no_cookie_string =
l10n_util::GetString(IDS_COOKIES_COOKIE_NONESELECTED);
« no previous file with comments | « chrome/browser/views/cookie_info_view.h ('k') | chrome/browser/views/cookie_prompt_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698