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

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

Issue 4682002: Remove "name" field from indexed databases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/cookie_details.h ('k') | chrome/browser/cocoa/cookie_details_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/cookie_details.h" 5 #include "chrome/browser/cocoa/cookie_details.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #import "base/i18n/time_formatting.h" 8 #import "base/i18n/time_formatting.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 (const BrowsingDataIndexedDBHelper::IndexedDBInfo*)indexedDBInfo { 241 (const BrowsingDataIndexedDBHelper::IndexedDBInfo*)indexedDBInfo {
242 if ((self = [super init])) { 242 if ((self = [super init])) {
243 type_ = kCocoaCookieDetailsTypeTreeIndexedDB; 243 type_ = kCocoaCookieDetailsTypeTreeIndexedDB;
244 canEditExpiration_ = NO; 244 canEditExpiration_ = NO;
245 domain_.reset([base::SysUTF8ToNSString(indexedDBInfo->origin) retain]); 245 domain_.reset([base::SysUTF8ToNSString(indexedDBInfo->origin) retain]);
246 fileSize_.reset([base::SysUTF16ToNSString(FormatBytes(indexedDBInfo->size, 246 fileSize_.reset([base::SysUTF16ToNSString(FormatBytes(indexedDBInfo->size,
247 GetByteDisplayUnits(indexedDBInfo->size), true)) retain]); 247 GetByteDisplayUnits(indexedDBInfo->size), true)) retain]);
248 lastModified_.reset([base::SysWideToNSString( 248 lastModified_.reset([base::SysWideToNSString(
249 base::TimeFormatFriendlyDateAndTime( 249 base::TimeFormatFriendlyDateAndTime(
250 indexedDBInfo->last_modified)) retain]); 250 indexedDBInfo->last_modified)) retain]);
251 name_.reset([base::SysUTF8ToNSString(indexedDBInfo->database_name) retain]);
252 } 251 }
253 return self; 252 return self;
254 } 253 }
255 254
256 + (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode { 255 + (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode {
257 CookieTreeNode::DetailedInfo info = treeNode->GetDetailedInfo(); 256 CookieTreeNode::DetailedInfo info = treeNode->GetDetailedInfo();
258 CookieTreeNode::DetailedInfo::NodeType nodeType = info.node_type; 257 CookieTreeNode::DetailedInfo::NodeType nodeType = info.node_type;
259 NSString* origin; 258 NSString* origin;
260 switch (nodeType) { 259 switch (nodeType) {
261 case CookieTreeNode::DetailedInfo::TYPE_COOKIE: 260 case CookieTreeNode::DetailedInfo::TYPE_COOKIE:
(...skipping 29 matching lines...) Expand all
291 details_.reset([details retain]); 290 details_.reset([details retain]);
292 } 291 }
293 return self; 292 return self;
294 } 293 }
295 294
296 - (CocoaCookieDetails*)details { 295 - (CocoaCookieDetails*)details {
297 return details_.get(); 296 return details_.get();
298 } 297 }
299 298
300 @end 299 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/cookie_details.h ('k') | chrome/browser/cocoa/cookie_details_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698