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

Unified Diff: ios/web/shell/shell_web_client.mm

Issue 2647943004: Return unique_ptr from WebClient::CreateWebMainParts() (Closed)
Patch Set: Respond to comments. Created 3 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
« no previous file with comments | « ios/web/shell/shell_web_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/shell_web_client.mm
diff --git a/ios/web/shell/shell_web_client.mm b/ios/web/shell/shell_web_client.mm
index 825e9d1f2fb96dc8dbf3b87cb322d693d1555d38..81f10fb3c0d0718d907b29bf1a9dd1aaa061549b 100644
--- a/ios/web/shell/shell_web_client.mm
+++ b/ios/web/shell/shell_web_client.mm
@@ -6,6 +6,7 @@
#import <UIKit/UIKit.h>
+#include "base/memory/ptr_util.h"
#include "ios/web/public/user_agent.h"
#include "ios/web/shell/shell_web_main_parts.h"
@@ -21,9 +22,11 @@ ShellWebClient::ShellWebClient() {
ShellWebClient::~ShellWebClient() {
}
-WebMainParts* ShellWebClient::CreateWebMainParts() {
- web_main_parts_.reset(new ShellWebMainParts);
- return web_main_parts_.get();
+std::unique_ptr<WebMainParts> ShellWebClient::CreateWebMainParts() {
+ std::unique_ptr<ShellWebMainParts> parts =
+ base::MakeUnique<ShellWebMainParts>();
+ web_main_parts_ = parts.get();
+ return std::move(parts);
}
ShellBrowserState* ShellWebClient::browser_state() const {
« no previous file with comments | « ios/web/shell/shell_web_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698