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

Side by Side Diff: headless/lib/browser/headless_devtools.cc

Issue 2255133002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "headless/lib/browser/headless_devtools.h" 5 #include "headless/lib/browser/headless_devtools.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return nullptr; 90 return nullptr;
91 } 91 }
92 92
93 } // namespace 93 } // namespace
94 94
95 std::unique_ptr<DevToolsHttpHandler> CreateLocalDevToolsHttpHandler( 95 std::unique_ptr<DevToolsHttpHandler> CreateLocalDevToolsHttpHandler(
96 HeadlessBrowser::Options* options) { 96 HeadlessBrowser::Options* options) {
97 const net::IPEndPoint& endpoint = options->devtools_endpoint; 97 const net::IPEndPoint& endpoint = options->devtools_endpoint;
98 std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> socket_factory( 98 std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> socket_factory(
99 new TCPServerSocketFactory(endpoint)); 99 new TCPServerSocketFactory(endpoint));
100 return base::WrapUnique(new DevToolsHttpHandler( 100 return base::MakeUnique<DevToolsHttpHandler>(
101 std::move(socket_factory), std::string(), new HeadlessDevToolsDelegate(), 101 std::move(socket_factory), std::string(), new HeadlessDevToolsDelegate(),
102 options->user_data_dir, // TODO(altimin): Figure a proper value for this. 102 options->user_data_dir, // TODO(altimin): Figure a proper value for this.
103 base::FilePath(), std::string(), options->user_agent)); 103 base::FilePath(), std::string(), options->user_agent);
104 } 104 }
105 105
106 } // namespace headless 106 } // namespace headless
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_content_browser_client.cc ('k') | headless/lib/browser/headless_web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698