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

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

Issue 10785017: Move CanonicalCookie into separate files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing include Created 8 years, 5 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 | Annotate | Revision Log
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/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"
11 #include "ui/base/l10n/l10n_util_mac.h" 11 #include "ui/base/l10n/l10n_util_mac.h"
12 #include "ui/base/text/bytes_formatting.h" 12 #include "ui/base/text/bytes_formatting.h"
13 #include "net/cookies/canonical_cookie.h"
13 #include "webkit/appcache/appcache_service.h" 14 #include "webkit/appcache/appcache_service.h"
14 15
15 #pragma mark Cocoa Cookie Details 16 #pragma mark Cocoa Cookie Details
16 17
17 @implementation CocoaCookieDetails 18 @implementation CocoaCookieDetails
18 19
19 @synthesize canEditExpiration = canEditExpiration_; 20 @synthesize canEditExpiration = canEditExpiration_;
20 @synthesize hasExpiration = hasExpiration_; 21 @synthesize hasExpiration = hasExpiration_;
21 @synthesize type = type_; 22 @synthesize type = type_;
22 23
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return manifestURL_.get(); 110 return manifestURL_.get();
110 } 111 }
111 112
112 - (id)initAsFolder { 113 - (id)initAsFolder {
113 if ((self = [super init])) { 114 if ((self = [super init])) {
114 type_ = kCocoaCookieDetailsTypeFolder; 115 type_ = kCocoaCookieDetailsTypeFolder;
115 } 116 }
116 return self; 117 return self;
117 } 118 }
118 119
119 - (id)initWithCookie:(const net::CookieMonster::CanonicalCookie*)cookie 120 - (id)initWithCookie:(const net::CanonicalCookie*)cookie
120 canEditExpiration:(BOOL)canEditExpiration { 121 canEditExpiration:(BOOL)canEditExpiration {
121 if ((self = [super init])) { 122 if ((self = [super init])) {
122 type_ = kCocoaCookieDetailsTypeCookie; 123 type_ = kCocoaCookieDetailsTypeCookie;
123 hasExpiration_ = cookie->IsPersistent(); 124 hasExpiration_ = cookie->IsPersistent();
124 canEditExpiration_ = canEditExpiration && hasExpiration_; 125 canEditExpiration_ = canEditExpiration && hasExpiration_;
125 name_.reset([base::SysUTF8ToNSString(cookie->Name()) retain]); 126 name_.reset([base::SysUTF8ToNSString(cookie->Name()) retain]);
126 content_.reset([base::SysUTF8ToNSString(cookie->Value()) retain]); 127 content_.reset([base::SysUTF8ToNSString(cookie->Value()) retain]);
127 path_.reset([base::SysUTF8ToNSString(cookie->Path()) retain]); 128 path_.reset([base::SysUTF8ToNSString(cookie->Path()) retain]);
128 domain_.reset([base::SysUTF8ToNSString(cookie->Domain()) retain]); 129 domain_.reset([base::SysUTF8ToNSString(cookie->Domain()) retain]);
129 130
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 details_.reset([details retain]); 290 details_.reset([details retain]);
290 } 291 }
291 return self; 292 return self;
292 } 293 }
293 294
294 - (CocoaCookieDetails*)details { 295 - (CocoaCookieDetails*)details {
295 return details_.get(); 296 return details_.get();
296 } 297 }
297 298
298 @end 299 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698