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

Side by Side Diff: chrome/browser/devtools/remote_debugging_server.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/devtools/remote_debugging_server.h" 5 #include "chrome/browser/devtools/remote_debugging_server.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); 101 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir);
102 DCHECK(result); 102 DCHECK(result);
103 } 103 }
104 104
105 base::FilePath debug_frontend_dir; 105 base::FilePath debug_frontend_dir;
106 #if defined(DEBUG_DEVTOOLS) 106 #if defined(DEBUG_DEVTOOLS)
107 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir); 107 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir);
108 #endif 108 #endif
109 109
110 content::DevToolsAgentHost::StartRemoteDebuggingServer( 110 content::DevToolsAgentHost::StartRemoteDebuggingServer(
111 base::WrapUnique(new TCPServerSocketFactory(ip, port)), 111 base::MakeUnique<TCPServerSocketFactory>(ip, port),
112 std::string(), 112 std::string(),
113 output_dir, 113 output_dir,
114 debug_frontend_dir, 114 debug_frontend_dir,
115 version_info::GetProductNameAndVersionForUserAgent(), 115 version_info::GetProductNameAndVersionForUserAgent(),
116 ::GetUserAgent()); 116 ::GetUserAgent());
117 } 117 }
118 118
119 RemoteDebuggingServer::~RemoteDebuggingServer() { 119 RemoteDebuggingServer::~RemoteDebuggingServer() {
120 // Ensure Profile is alive, because the whole DevTools subsystem 120 // Ensure Profile is alive, because the whole DevTools subsystem
121 // accesses it during shutdown. 121 // accesses it during shutdown.
122 DCHECK(g_browser_process->profile_manager()); 122 DCHECK(g_browser_process->profile_manager());
123 content::DevToolsAgentHost::StopRemoteDebuggingServer(); 123 content::DevToolsAgentHost::StopRemoteDebuggingServer();
124 } 124 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_device.cc ('k') | chrome/browser/download/download_dir_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698