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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/cookie_details.mm

Issue 1024503002: Add cookies' first-partyness to chrome://settings/cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/content_settings/cookie_details.h" 5 #include "chrome/browser/ui/cocoa/content_settings/cookie_details.h"
6 6
7 #import "base/i18n/time_formatting.h" 7 #import "base/i18n/time_formatting.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/browsing_data/cookies_tree_model.h" 9 #include "chrome/browser/browsing_data/cookies_tree_model.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 expires_.reset([base::SysUTF16ToNSString( 140 expires_.reset([base::SysUTF16ToNSString(
141 base::TimeFormatFriendlyDateAndTime(cookie->ExpiryDate())) retain]); 141 base::TimeFormatFriendlyDateAndTime(cookie->ExpiryDate())) retain]);
142 } else { 142 } else {
143 expires_.reset([l10n_util::GetNSStringWithFixup( 143 expires_.reset([l10n_util::GetNSStringWithFixup(
144 IDS_COOKIES_COOKIE_EXPIRES_SESSION) retain]); 144 IDS_COOKIES_COOKIE_EXPIRES_SESSION) retain]);
145 } 145 }
146 146
147 created_.reset([base::SysUTF16ToNSString( 147 created_.reset([base::SysUTF16ToNSString(
148 base::TimeFormatFriendlyDateAndTime(cookie->CreationDate())) retain]); 148 base::TimeFormatFriendlyDateAndTime(cookie->CreationDate())) retain]);
149 149
150 if (cookie->IsSecure()) { 150 if (cookie->IsSecure()) {
Nico 2015/03/20 14:04:11 Could the cookie -> resource id mapping function b
151 sendFor_.reset([l10n_util::GetNSStringWithFixup( 151 if (cookie->IsFirstPartyOnly()) {
152 IDS_COOKIES_COOKIE_SENDFOR_SECURE) retain]); 152 sendFor_.reset([l10n_util::GetNSStringWithFixup(
153 IDS_COOKIES_COOKIE_SENDFOR_SECURE_FIRSTPARTY) retain]);
154 } else {
155 sendFor_.reset([l10n_util::GetNSStringWithFixup(
156 IDS_COOKIES_COOKIE_SENDFOR_SECURE) retain]);
157 }
153 } else { 158 } else {
154 sendFor_.reset([l10n_util::GetNSStringWithFixup( 159 if (cookie->IsFirstPartyOnly()) {
155 IDS_COOKIES_COOKIE_SENDFOR_ANY) retain]); 160 sendFor_.reset([l10n_util::GetNSStringWithFixup(
161 IDS_COOKIES_COOKIE_SENDFOR_FIRSTPARTY) retain]);
162 } else {
163 sendFor_.reset([l10n_util::GetNSStringWithFixup(
164 IDS_COOKIES_COOKIE_SENDFOR_ANY) retain]);
165 }
156 } 166 }
157 } 167 }
158 return self; 168 return self;
159 } 169 }
160 170
161 - (id)initWithDatabase:(const BrowsingDataDatabaseHelper::DatabaseInfo*) 171 - (id)initWithDatabase:(const BrowsingDataDatabaseHelper::DatabaseInfo*)
162 databaseInfo { 172 databaseInfo {
163 if ((self = [super init])) { 173 if ((self = [super init])) {
164 type_ = kCocoaCookieDetailsTypeTreeDatabase; 174 type_ = kCocoaCookieDetailsTypeTreeDatabase;
165 canEditExpiration_ = NO; 175 canEditExpiration_ = NO;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 details_.reset([details retain]); 333 details_.reset([details retain]);
324 } 334 }
325 return self; 335 return self;
326 } 336 }
327 337
328 - (CocoaCookieDetails*)details { 338 - (CocoaCookieDetails*)details {
329 return details_.get(); 339 return details_.get();
330 } 340 }
331 341
332 @end 342 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698