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

Side by Side Diff: ios/chrome/browser/infobars/infobar_utils.mm

Issue 2762973002: [ios] Add TODO to record usages of "return std::move(foo)" pattern. (Closed)
Patch Set: Created 3 years, 9 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
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 #include "ios/chrome/browser/infobars/infobar_utils.h" 5 #include "ios/chrome/browser/infobars/infobar_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "components/infobars/core/confirm_infobar_delegate.h" 10 #include "components/infobars/core/confirm_infobar_delegate.h"
11 #include "ios/chrome/browser/infobars/confirm_infobar_controller.h" 11 #include "ios/chrome/browser/infobars/confirm_infobar_controller.h"
12 #include "ios/chrome/browser/infobars/infobar.h" 12 #include "ios/chrome/browser/infobars/infobar.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc) 14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support." 15 #error "This file requires ARC support."
16 #endif 16 #endif
17 17
18 std::unique_ptr<infobars::InfoBar> CreateConfirmInfoBar( 18 std::unique_ptr<infobars::InfoBar> CreateConfirmInfoBar(
19 std::unique_ptr<ConfirmInfoBarDelegate> delegate) { 19 std::unique_ptr<ConfirmInfoBarDelegate> delegate) {
20 std::unique_ptr<InfoBarIOS> infobar(new InfoBarIOS(std::move(delegate))); 20 std::unique_ptr<InfoBarIOS> infobar(new InfoBarIOS(std::move(delegate)));
21 ConfirmInfoBarController* controller = 21 ConfirmInfoBarController* controller =
22 [[ConfirmInfoBarController alloc] initWithDelegate:infobar.get()]; 22 [[ConfirmInfoBarController alloc] initWithDelegate:infobar.get()];
23 infobar->SetController(controller); 23 infobar->SetController(controller);
24 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required.
24 return std::move(infobar); 25 return std::move(infobar);
25 } 26 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/history/history_service_factory.cc ('k') | ios/chrome/browser/ios_chrome_io_thread.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698