| OLD | NEW |
| 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 "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 - (id)initWithAppCacheManifestURL:(const std::string&)manifestURL { | 233 - (id)initWithAppCacheManifestURL:(const std::string&)manifestURL { |
| 234 if ((self = [super init])) { | 234 if ((self = [super init])) { |
| 235 type_ = kCocoaCookieDetailsTypePromptAppCache; | 235 type_ = kCocoaCookieDetailsTypePromptAppCache; |
| 236 canEditExpiration_ = NO; | 236 canEditExpiration_ = NO; |
| 237 manifestURL_.reset([base::SysUTF8ToNSString(manifestURL) retain]); | 237 manifestURL_.reset([base::SysUTF8ToNSString(manifestURL) retain]); |
| 238 } | 238 } |
| 239 return self; | 239 return self; |
| 240 } | 240 } |
| 241 | 241 |
| 242 - (id)initWithIndexedDBInfo: | 242 - (id)initWithIndexedDBInfo: |
| 243 (const BrowsingDataIndexedDBHelper::IndexedDBInfo*)indexedDBInfo { | 243 (const content::IndexedDBInfo*)indexedDBInfo { |
| 244 if ((self = [super init])) { | 244 if ((self = [super init])) { |
| 245 type_ = kCocoaCookieDetailsTypeTreeIndexedDB; | 245 type_ = kCocoaCookieDetailsTypeTreeIndexedDB; |
| 246 canEditExpiration_ = NO; | 246 canEditExpiration_ = NO; |
| 247 domain_.reset([base::SysUTF8ToNSString( | 247 domain_.reset([base::SysUTF8ToNSString( |
| 248 indexedDBInfo->origin.spec()) retain]); | 248 indexedDBInfo->origin.spec()) retain]); |
| 249 fileSize_.reset([base::SysUTF16ToNSString( | 249 fileSize_.reset([base::SysUTF16ToNSString( |
| 250 ui::FormatBytes(indexedDBInfo->size)) retain]); | 250 ui::FormatBytes(indexedDBInfo->size)) retain]); |
| 251 lastModified_.reset([base::SysUTF16ToNSString( | 251 lastModified_.reset([base::SysUTF16ToNSString( |
| 252 base::TimeFormatFriendlyDateAndTime( | 252 base::TimeFormatFriendlyDateAndTime( |
| 253 indexedDBInfo->last_modified)) retain]); | 253 indexedDBInfo->last_modified)) retain]); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 details_.reset([details retain]); | 290 details_.reset([details retain]); |
| 291 } | 291 } |
| 292 return self; | 292 return self; |
| 293 } | 293 } |
| 294 | 294 |
| 295 - (CocoaCookieDetails*)details { | 295 - (CocoaCookieDetails*)details { |
| 296 return details_.get(); | 296 return details_.get(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 @end | 299 @end |
| OLD | NEW |