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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 (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 "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/history/top_sites_factory.h" 11 #include "chrome/browser/history/top_sites_factory.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_iterator.h" 14 #include "chrome/browser/ui/browser_iterator.h"
15 #include "chrome/common/chrome_content_client.h" 15 #include "chrome/common/chrome_content_client.h"
16 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
17 #include "chrome/common/chrome_version_info.h"
18 #include "components/devtools_http_handler/devtools_http_handler.h" 17 #include "components/devtools_http_handler/devtools_http_handler.h"
19 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" 18 #include "components/devtools_http_handler/devtools_http_handler_delegate.h"
20 #include "components/history/core/browser/top_sites.h" 19 #include "components/history/core/browser/top_sites.h"
20 #include "components/version_info/version_info.h"
21 #include "content/public/browser/devtools_frontend_host.h" 21 #include "content/public/browser/devtools_frontend_host.h"
22 #include "grit/browser_resources.h" 22 #include "grit/browser_resources.h"
23 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
24 #include "net/socket/tcp_server_socket.h" 24 #include "net/socket/tcp_server_socket.h"
25 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
26 26
27 namespace { 27 namespace {
28 28
29 base::LazyInstance<bool>::Leaky g_tethering_enabled = LAZY_INSTANCE_INITIALIZER; 29 base::LazyInstance<bool>::Leaky g_tethering_enabled = LAZY_INSTANCE_INITIALIZER;
30 30
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // bootstrap the connection process. 153 // bootstrap the connection process.
154 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); 154 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir);
155 DCHECK(result); 155 DCHECK(result);
156 } 156 }
157 157
158 base::FilePath debug_frontend_dir; 158 base::FilePath debug_frontend_dir;
159 #if defined(DEBUG_DEVTOOLS) 159 #if defined(DEBUG_DEVTOOLS)
160 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir); 160 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir);
161 #endif 161 #endif
162 162
163 chrome::VersionInfo version_info;
164
165 devtools_http_handler_.reset(new devtools_http_handler::DevToolsHttpHandler( 163 devtools_http_handler_.reset(new devtools_http_handler::DevToolsHttpHandler(
166 make_scoped_ptr(new TCPServerSocketFactory(ip, port)), 164 make_scoped_ptr(new TCPServerSocketFactory(ip, port)),
167 std::string(), 165 std::string(),
168 new ChromeDevToolsHttpHandlerDelegate(), 166 new ChromeDevToolsHttpHandlerDelegate(),
169 output_dir, 167 output_dir,
170 debug_frontend_dir, 168 debug_frontend_dir,
171 version_info.ProductNameAndVersionForUserAgent(), 169 version_info::GetProductNameAndVersionForUserAgent(),
172 ::GetUserAgent())); 170 ::GetUserAgent()));
173 } 171 }
174 172
175 RemoteDebuggingServer::~RemoteDebuggingServer() { 173 RemoteDebuggingServer::~RemoteDebuggingServer() {
176 // Ensure Profile is alive, because the whole DevTools subsystem 174 // Ensure Profile is alive, because the whole DevTools subsystem
177 // accesses it during shutdown. 175 // accesses it during shutdown.
178 DCHECK(g_browser_process->profile_manager()); 176 DCHECK(g_browser_process->profile_manager());
179 } 177 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_targets_ui.cc ('k') | chrome/browser/diagnostics/recon_diagnostics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698