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

Side by Side Diff: ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm

Issue 2702273002: Fix a memory leak in ios bookmarks. (Closed)
Patch Set: revert Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.h" 5 #import "ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 self.nameItem = 351 self.nameItem =
352 [[[BookmarkTextFieldItem alloc] initWithType:ItemTypeName] autorelease]; 352 [[[BookmarkTextFieldItem alloc] initWithType:ItemTypeName] autorelease];
353 self.nameItem.accessibilityIdentifier = @"Title Field"; 353 self.nameItem.accessibilityIdentifier = @"Title Field";
354 self.nameItem.placeholder = 354 self.nameItem.placeholder =
355 l10n_util::GetNSString(IDS_IOS_BOOKMARK_NAME_FIELD_HEADER); 355 l10n_util::GetNSString(IDS_IOS_BOOKMARK_NAME_FIELD_HEADER);
356 self.nameItem.text = bookmark_utils_ios::TitleForBookmarkNode(self.bookmark); 356 self.nameItem.text = bookmark_utils_ios::TitleForBookmarkNode(self.bookmark);
357 self.nameItem.delegate = self; 357 self.nameItem.delegate = self;
358 [model addItem:self.nameItem toSectionWithIdentifier:SectionIdentifierInfo]; 358 [model addItem:self.nameItem toSectionWithIdentifier:SectionIdentifierInfo];
359 359
360 self.folderItem = 360 self.folderItem = [[[BookmarkParentFolderItem alloc]
361 [[BookmarkParentFolderItem alloc] initWithType:ItemTypeFolder]; 361 initWithType:ItemTypeFolder] autorelease];
362 self.folderItem.title = bookmark_utils_ios::TitleForBookmarkNode(self.folder); 362 self.folderItem.title = bookmark_utils_ios::TitleForBookmarkNode(self.folder);
363 [model addItem:self.folderItem toSectionWithIdentifier:SectionIdentifierInfo]; 363 [model addItem:self.folderItem toSectionWithIdentifier:SectionIdentifierInfo];
364 364
365 self.URLItem = 365 self.URLItem =
366 [[[BookmarkTextFieldItem alloc] initWithType:ItemTypeURL] autorelease]; 366 [[[BookmarkTextFieldItem alloc] initWithType:ItemTypeURL] autorelease];
367 self.URLItem.accessibilityIdentifier = @"URL Field"; 367 self.URLItem.accessibilityIdentifier = @"URL Field";
368 self.URLItem.placeholder = 368 self.URLItem.placeholder =
369 l10n_util::GetNSString(IDS_IOS_BOOKMARK_URL_FIELD_HEADER); 369 l10n_util::GetNSString(IDS_IOS_BOOKMARK_URL_FIELD_HEADER);
370 self.URLItem.text = base::SysUTF8ToNSString(self.bookmark->url().spec()); 370 self.URLItem.text = base::SysUTF8ToNSString(self.bookmark->url().spec());
371 self.URLItem.delegate = self; 371 self.URLItem.delegate = self;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 base::WeakNSObject<BookmarkEditViewController> weakSelf(self); 586 base::WeakNSObject<BookmarkEditViewController> weakSelf(self);
587 return @[ [UIKeyCommand cr_keyCommandWithInput:UIKeyInputEscape 587 return @[ [UIKeyCommand cr_keyCommandWithInput:UIKeyInputEscape
588 modifierFlags:Cr_UIKeyModifierNone 588 modifierFlags:Cr_UIKeyModifierNone
589 title:nil 589 title:nil
590 action:^{ 590 action:^{
591 [weakSelf dismiss]; 591 [weakSelf dismiss];
592 }] ]; 592 }] ];
593 } 593 }
594 594
595 @end 595 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698