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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm

Issue 1579863003: Convert Pass()→std::move() for Mac build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
index 48f3579cf17b65979872ff45fe034ce969e73d74..2fd6acaf30899d6b93419c3a738816aadd482d0f 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
@@ -2,15 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
+
#import <Cocoa/Cocoa.h>
+#include <utility>
+
#import "base/mac/scoped_block.h"
#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#import "chrome/browser/ui/cocoa/download/download_item_controller.h"
-#import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
#import "chrome/browser/ui/cocoa/view_resizer_pong.h"
#include "content/public/test/mock_download_item.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -36,7 +39,7 @@ using ::testing::AnyNumber;
@implementation WrappedMockDownloadItem
- (id)initWithMockDownload:(scoped_ptr<content::MockDownloadItem>)download {
if ((self = [super init])) {
- download_ = download.Pass();
+ download_ = std::move(download);
}
return self;
}
@@ -143,7 +146,8 @@ id DownloadShelfControllerTest::CreateItemController() {
.WillByDefault(Return(content::DownloadItem::IN_PROGRESS));
base::scoped_nsobject<WrappedMockDownloadItem> wrappedMockDownload(
- [[WrappedMockDownloadItem alloc] initWithMockDownload:download.Pass()]);
+ [[WrappedMockDownloadItem alloc]
+ initWithMockDownload:std::move(download)]);
id item_controller =
[OCMockObject mockForClass:[DownloadItemController class]];

Powered by Google App Engine
This is Rietveld 408576698