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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change 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: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 52cb0605586a313b0bdc1adcecc8bac85c32af97..c86d6db5fc92cf74d9e9e9bb2829adb97a25e1f4 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -6,7 +6,9 @@
#import <objc/runtime.h>
#include <stddef.h>
+
#include <cmath>
+#include <utility>
#include "base/ios/block_types.h"
#import "base/ios/ns_error_util.h"
@@ -585,7 +587,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
- (instancetype)initWithWebState:(scoped_ptr<WebStateImpl>)webState {
self = [super init];
if (self) {
- _webStateImpl = webState.Pass();
+ _webStateImpl = std::move(webState);
DCHECK(_webStateImpl);
_webStateImpl->SetWebController(self);
_webStateImpl->InitializeRequestTracker(self);
@@ -894,7 +896,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
}
- (void)setDOMElementForLastTouch:(scoped_ptr<base::DictionaryValue>)element {
- _DOMElementForLastTouch = element.Pass();
+ _DOMElementForLastTouch = std::move(element);
}
- (void)showContextMenu:(UIGestureRecognizer*)gestureRecognizer {
@@ -1876,7 +1878,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
if (handler) {
scoped_ptr<base::Value> result(
base::JSONReader::Read(base::SysNSStringToUTF8(stringResult)));
- handler(result.Pass(), error);
+ handler(std::move(result), error);
}
}];
}
@@ -2986,7 +2988,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
base::WeakNSObject<CRWWebController> weakSelf(self);
[self fetchDOMElementAtPoint:[touch locationInView:self.webView]
completionHandler:^(scoped_ptr<base::DictionaryValue> element) {
- [weakSelf setDOMElementForLastTouch:element.Pass()];
+ [weakSelf setDOMElementForLastTouch:std::move(element)];
}];
return YES;
}
@@ -3576,7 +3578,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
// |element| scoped_ptr.
elementAsDict.reset(elementAsDictPtr);
}
- handler(elementAsDict.Pass());
+ handler(std::move(elementAsDict));
}];
}];
}
« no previous file with comments | « ios/web/web_state/ui/crw_ui_web_view_web_controller.mm ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698