OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "chrome/browser/cookies_tree_model.h" | 10 #include "chrome/browser/cookies_tree_model.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 manifestURL_.reset([base::SysUTF8ToNSString(manifestURL) retain]); | 236 manifestURL_.reset([base::SysUTF8ToNSString(manifestURL) retain]); |
237 } | 237 } |
238 return self; | 238 return self; |
239 } | 239 } |
240 | 240 |
241 - (id)initWithIndexedDBInfo: | 241 - (id)initWithIndexedDBInfo: |
242 (const BrowsingDataIndexedDBHelper::IndexedDBInfo*)indexedDBInfo { | 242 (const BrowsingDataIndexedDBHelper::IndexedDBInfo*)indexedDBInfo { |
243 if ((self = [super init])) { | 243 if ((self = [super init])) { |
244 type_ = kCocoaCookieDetailsTypeTreeIndexedDB; | 244 type_ = kCocoaCookieDetailsTypeTreeIndexedDB; |
245 canEditExpiration_ = NO; | 245 canEditExpiration_ = NO; |
246 domain_.reset([base::SysUTF8ToNSString(indexedDBInfo->origin) retain]); | 246 domain_.reset([base::SysUTF8ToNSString( |
| 247 indexedDBInfo->origin.spec()) retain]); |
247 fileSize_.reset([base::SysUTF16ToNSString( | 248 fileSize_.reset([base::SysUTF16ToNSString( |
248 ui::FormatBytes(indexedDBInfo->size)) retain]); | 249 ui::FormatBytes(indexedDBInfo->size)) retain]); |
249 lastModified_.reset([base::SysUTF16ToNSString( | 250 lastModified_.reset([base::SysUTF16ToNSString( |
250 base::TimeFormatFriendlyDateAndTime( | 251 base::TimeFormatFriendlyDateAndTime( |
251 indexedDBInfo->last_modified)) retain]); | 252 indexedDBInfo->last_modified)) retain]); |
252 } | 253 } |
253 return self; | 254 return self; |
254 } | 255 } |
255 | 256 |
256 + (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode { | 257 + (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 details_.reset([details retain]); | 292 details_.reset([details retain]); |
292 } | 293 } |
293 return self; | 294 return self; |
294 } | 295 } |
295 | 296 |
296 - (CocoaCookieDetails*)details { | 297 - (CocoaCookieDetails*)details { |
297 return details_.get(); | 298 return details_.get(); |
298 } | 299 } |
299 | 300 |
300 @end | 301 @end |
OLD | NEW |