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

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

Issue 1038143002: favor DCHECK_CURRENTLY_ON for better logs in chromecast/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/devtools/remote_debugging_server.h" 5 #include "chromecast/browser/devtools/remote_debugging_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #endif 103 #endif
104 } 104 }
105 105
106 std::string GetFrontendUrl() { 106 std::string GetFrontendUrl() {
107 return base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str()); 107 return base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str());
108 } 108 }
109 109
110 } // namespace 110 } // namespace
111 111
112 RemoteDebuggingServer::RemoteDebuggingServer() : port_(0) { 112 RemoteDebuggingServer::RemoteDebuggingServer() : port_(0) {
113 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 113 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
114 pref_port_.Init(prefs::kRemoteDebuggingPort, 114 pref_port_.Init(prefs::kRemoteDebuggingPort,
115 CastBrowserProcess::GetInstance()->pref_service(), 115 CastBrowserProcess::GetInstance()->pref_service(),
116 base::Bind(&RemoteDebuggingServer::OnPortChanged, 116 base::Bind(&RemoteDebuggingServer::OnPortChanged,
117 base::Unretained(this))); 117 base::Unretained(this)));
118 118
119 // Starts new dev tools, clearing port number saved in config. 119 // Starts new dev tools, clearing port number saved in config.
120 // Remote debugging in production must be triggered only by config server. 120 // Remote debugging in production must be triggered only by config server.
121 pref_port_.SetValue(ShouldStartImmediately() ? 121 pref_port_.SetValue(ShouldStartImmediately() ?
122 kDefaultRemoteDebuggingPort : 0); 122 kDefaultRemoteDebuggingPort : 0);
123 OnPortChanged(); 123 OnPortChanged();
(...skipping 25 matching lines...) Expand all
149 CreateSocketFactory(port_), 149 CreateSocketFactory(port_),
150 GetFrontendUrl(), 150 GetFrontendUrl(),
151 new CastDevToolsDelegate(), 151 new CastDevToolsDelegate(),
152 base::FilePath())); 152 base::FilePath()));
153 LOG(INFO) << "Devtools started: port=" << port_; 153 LOG(INFO) << "Devtools started: port=" << port_;
154 } 154 }
155 } 155 }
156 156
157 } // namespace shell 157 } // namespace shell
158 } // namespace chromecast 158 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_http_user_agent_settings.cc ('k') | chromecast/browser/media/cma_message_filter_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698