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

Side by Side Diff: content/browser/devtools/devtools_http_handler_impl.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 "content/browser/devtools/devtools_http_handler_impl.h" 5 #include "content/browser/devtools/devtools_http_handler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 : public DevToolsHttpHandler::DevToolsAgentHostBinding { 78 : public DevToolsHttpHandler::DevToolsAgentHostBinding {
79 public: 79 public:
80 DevToolsDefaultBindingHandler() { 80 DevToolsDefaultBindingHandler() {
81 } 81 }
82 82
83 virtual std::string GetIdentifier(DevToolsAgentHost* agent_host) OVERRIDE { 83 virtual std::string GetIdentifier(DevToolsAgentHost* agent_host) OVERRIDE {
84 return agent_host->GetId(); 84 return agent_host->GetId();
85 } 85 }
86 86
87 virtual DevToolsAgentHost* ForIdentifier(const std::string& id) OVERRIDE { 87 virtual DevToolsAgentHost* ForIdentifier(const std::string& id) OVERRIDE {
88 return DevToolsAgentHost::GetForId(id); 88 return DevToolsAgentHost::GetForId(id).get();
89 } 89 }
90 }; 90 };
91 91
92 // An internal implementation of DevToolsClientHost that delegates 92 // An internal implementation of DevToolsClientHost that delegates
93 // messages sent for DevToolsClient to a DebuggerShell instance. 93 // messages sent for DevToolsClient to a DebuggerShell instance.
94 class DevToolsClientHostImpl : public DevToolsClientHost { 94 class DevToolsClientHostImpl : public DevToolsClientHost {
95 public: 95 public:
96 DevToolsClientHostImpl(base::MessageLoop* message_loop, 96 DevToolsClientHostImpl(base::MessageLoop* message_loop,
97 net::HttpServer* server, 97 net::HttpServer* server,
98 int connection_id) 98 int connection_id)
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 host.c_str(), 886 host.c_str(),
887 kPageUrlPrefix, 887 kPageUrlPrefix,
888 id.c_str())); 888 id.c_str()));
889 std::string devtools_frontend_url = GetFrontendURLInternal( 889 std::string devtools_frontend_url = GetFrontendURLInternal(
890 id.c_str(), 890 id.c_str(),
891 host); 891 host);
892 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url); 892 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url);
893 } 893 }
894 894
895 } // namespace content 895 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/chrome_appcache_service_unittest.cc ('k') | content/browser/devtools/devtools_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698