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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2fd6acaf30899d6b93419c3a738816aadd482d0f..a181d9acc805c2a016ee874d66ded5b69427080f 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
@@ -6,11 +6,11 @@
#import <Cocoa/Cocoa.h>
+#include <memory>
#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"
@@ -29,15 +29,16 @@ using ::testing::AnyNumber;
// DownloadItemController.
@interface WrappedMockDownloadItem : NSObject {
@private
- scoped_ptr<content::MockDownloadItem> download_;
+ std::unique_ptr<content::MockDownloadItem> download_;
}
-- (id)initWithMockDownload:(scoped_ptr<content::MockDownloadItem>)download;
+- (id)initWithMockDownload:(std::unique_ptr<content::MockDownloadItem>)download;
- (content::DownloadItem*)download;
- (content::MockDownloadItem*)mockDownload;
@end
@implementation WrappedMockDownloadItem
-- (id)initWithMockDownload:(scoped_ptr<content::MockDownloadItem>)download {
+- (id)initWithMockDownload:
+ (std::unique_ptr<content::MockDownloadItem>)download {
if ((self = [super init])) {
download_ = std::move(download);
}
@@ -138,7 +139,7 @@ class DownloadShelfControllerTest : public CocoaProfileTest {
};
id DownloadShelfControllerTest::CreateItemController() {
- scoped_ptr<content::MockDownloadItem> download(
+ std::unique_ptr<content::MockDownloadItem> download(
new ::testing::NiceMock<content::MockDownloadItem>);
ON_CALL(*download.get(), GetOpened())
.WillByDefault(Return(false));

Powered by Google App Engine
This is Rietveld 408576698