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

Side by Side Diff: chrome/browser/android/dev_tools_server.cc

Issue 625113002: replace OVERRIDE and FINAL with override and final in chrome/browser/[a-i]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix newly added OVERRIDEs Created 6 years, 2 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/android/dev_tools_server.h" 5 #include "chrome/browser/android/dev_tools_server.h"
6 6
7 #include <pwd.h> 7 #include <pwd.h>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Delegate implementation for the devtools http handler on android. A new 79 // Delegate implementation for the devtools http handler on android. A new
80 // instance of this gets created each time devtools is enabled. 80 // instance of this gets created each time devtools is enabled.
81 class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { 81 class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate {
82 public: 82 public:
83 explicit DevToolsServerDelegate( 83 explicit DevToolsServerDelegate(
84 const net::UnixDomainServerSocket::AuthCallback& auth_callback) 84 const net::UnixDomainServerSocket::AuthCallback& auth_callback)
85 : last_tethering_socket_(0), 85 : last_tethering_socket_(0),
86 auth_callback_(auth_callback) { 86 auth_callback_(auth_callback) {
87 } 87 }
88 88
89 virtual std::string GetDiscoveryPageHTML() OVERRIDE { 89 virtual std::string GetDiscoveryPageHTML() override {
90 // TopSites updates itself after a delay. Ask TopSites to update itself 90 // TopSites updates itself after a delay. Ask TopSites to update itself
91 // when we're about to show the remote debugging landing page. 91 // when we're about to show the remote debugging landing page.
92 content::BrowserThread::PostTask( 92 content::BrowserThread::PostTask(
93 content::BrowserThread::UI, 93 content::BrowserThread::UI,
94 FROM_HERE, 94 FROM_HERE,
95 base::Bind(&DevToolsServerDelegate::PopulatePageThumbnails)); 95 base::Bind(&DevToolsServerDelegate::PopulatePageThumbnails));
96 return ResourceBundle::GetSharedInstance().GetRawDataResource( 96 return ResourceBundle::GetSharedInstance().GetRawDataResource(
97 IDR_DEVTOOLS_DISCOVERY_PAGE_HTML).as_string(); 97 IDR_DEVTOOLS_DISCOVERY_PAGE_HTML).as_string();
98 } 98 }
99 99
100 virtual bool BundlesFrontendResources() OVERRIDE { 100 virtual bool BundlesFrontendResources() override {
101 return false; 101 return false;
102 } 102 }
103 103
104 virtual base::FilePath GetDebugFrontendDir() OVERRIDE { 104 virtual base::FilePath GetDebugFrontendDir() override {
105 return base::FilePath(); 105 return base::FilePath();
106 } 106 }
107 107
108 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( 108 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
109 net::StreamListenSocket::Delegate* delegate, 109 net::StreamListenSocket::Delegate* delegate,
110 std::string* name) OVERRIDE { 110 std::string* name) override {
111 *name = base::StringPrintf( 111 *name = base::StringPrintf(
112 kTetheringSocketName, getpid(), ++last_tethering_socket_); 112 kTetheringSocketName, getpid(), ++last_tethering_socket_);
113 return net::deprecated::UnixDomainListenSocket:: 113 return net::deprecated::UnixDomainListenSocket::
114 CreateAndListenWithAbstractNamespace( 114 CreateAndListenWithAbstractNamespace(
115 *name, 115 *name,
116 "", 116 "",
117 delegate, 117 delegate,
118 auth_callback_) 118 auth_callback_)
119 .PassAs<net::StreamListenSocket>(); 119 .PassAs<net::StreamListenSocket>();
120 } 120 }
(...skipping 20 matching lines...) Expand all
141 public: 141 public:
142 UnixDomainServerSocketFactory( 142 UnixDomainServerSocketFactory(
143 const std::string& socket_name, 143 const std::string& socket_name,
144 const net::UnixDomainServerSocket::AuthCallback& auth_callback) 144 const net::UnixDomainServerSocket::AuthCallback& auth_callback)
145 : content::DevToolsHttpHandler::ServerSocketFactory(socket_name, 0, 1), 145 : content::DevToolsHttpHandler::ServerSocketFactory(socket_name, 0, 1),
146 auth_callback_(auth_callback) { 146 auth_callback_(auth_callback) {
147 } 147 }
148 148
149 private: 149 private:
150 // content::DevToolsHttpHandler::ServerSocketFactory. 150 // content::DevToolsHttpHandler::ServerSocketFactory.
151 virtual scoped_ptr<net::ServerSocket> Create() const OVERRIDE { 151 virtual scoped_ptr<net::ServerSocket> Create() const override {
152 return scoped_ptr<net::ServerSocket>( 152 return scoped_ptr<net::ServerSocket>(
153 new net::UnixDomainServerSocket(auth_callback_, 153 new net::UnixDomainServerSocket(auth_callback_,
154 true /* use_abstract_namespace */)); 154 true /* use_abstract_namespace */));
155 } 155 }
156 156
157 virtual scoped_ptr<net::ServerSocket> CreateAndListen() const OVERRIDE { 157 virtual scoped_ptr<net::ServerSocket> CreateAndListen() const override {
158 scoped_ptr<net::ServerSocket> socket = Create(); 158 scoped_ptr<net::ServerSocket> socket = Create();
159 if (!socket) 159 if (!socket)
160 return scoped_ptr<net::ServerSocket>(); 160 return scoped_ptr<net::ServerSocket>();
161 161
162 if (socket->ListenWithAddressAndPort(address_, port_, backlog_) == net::OK) 162 if (socket->ListenWithAddressAndPort(address_, port_, backlog_) == net::OK)
163 return socket.Pass(); 163 return socket.Pass();
164 164
165 // Try a fallback socket name. 165 // Try a fallback socket name.
166 const std::string fallback_address( 166 const std::string fallback_address(
167 base::StringPrintf("%s_%d", address_.c_str(), getpid())); 167 base::StringPrintf("%s_%d", address_.c_str(), getpid()));
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 jlong server, 252 jlong server,
253 jboolean enabled, 253 jboolean enabled,
254 jboolean allow_debug_permission) { 254 jboolean allow_debug_permission) {
255 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); 255 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server);
256 if (enabled) { 256 if (enabled) {
257 devtools_server->Start(allow_debug_permission); 257 devtools_server->Start(allow_debug_permission);
258 } else { 258 } else {
259 devtools_server->Stop(); 259 devtools_server->Stop();
260 } 260 }
261 } 261 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698