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

Unified Diff: extensions/browser/api/socket/socket_api.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/socket/socket_api.h ('k') | extensions/browser/api/socket/tls_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/socket/socket_api.cc
diff --git a/extensions/browser/api/socket/socket_api.cc b/extensions/browser/api/socket/socket_api.cc
index 0a173fd912bc8d505a0825d63911ef87b9765205..90c83d81197d0bb58e86d490a880c096e3650a3a 100644
--- a/extensions/browser/api/socket/socket_api.cc
+++ b/extensions/browser/api/socket/socket_api.cc
@@ -216,17 +216,17 @@ SocketCreateFunction::SocketCreateFunction()
SocketCreateFunction::~SocketCreateFunction() {}
bool SocketCreateFunction::Prepare() {
- params_ = core_api::socket::Create::Params::Create(*args_);
+ params_ = api::socket::Create::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
switch (params_->type) {
- case extensions::core_api::socket::SOCKET_TYPE_TCP:
+ case extensions::api::socket::SOCKET_TYPE_TCP:
socket_type_ = kSocketTypeTCP;
break;
- case extensions::core_api::socket::SOCKET_TYPE_UDP:
+ case extensions::api::socket::SOCKET_TYPE_UDP:
socket_type_ = kSocketTypeUDP;
break;
- case extensions::core_api::socket::SOCKET_TYPE_NONE:
+ case extensions::api::socket::SOCKET_TYPE_NONE:
NOTREACHED();
break;
}
@@ -401,7 +401,7 @@ SocketListenFunction::SocketListenFunction() {}
SocketListenFunction::~SocketListenFunction() {}
bool SocketListenFunction::Prepare() {
- params_ = core_api::socket::Listen::Params::Create(*args_);
+ params_ = api::socket::Listen::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -442,7 +442,7 @@ SocketAcceptFunction::SocketAcceptFunction() {}
SocketAcceptFunction::~SocketAcceptFunction() {}
bool SocketAcceptFunction::Prepare() {
- params_ = core_api::socket::Accept::Params::Create(*args_);
+ params_ = api::socket::Accept::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -475,7 +475,7 @@ SocketReadFunction::SocketReadFunction() {}
SocketReadFunction::~SocketReadFunction() {}
bool SocketReadFunction::Prepare() {
- params_ = core_api::socket::Read::Params::Create(*args_);
+ params_ = api::socket::Read::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -550,7 +550,7 @@ SocketRecvFromFunction::SocketRecvFromFunction() {}
SocketRecvFromFunction::~SocketRecvFromFunction() {}
bool SocketRecvFromFunction::Prepare() {
- params_ = core_api::socket::RecvFrom::Params::Create(*args_);
+ params_ = api::socket::RecvFrom::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -667,7 +667,7 @@ SocketSetKeepAliveFunction::SocketSetKeepAliveFunction() {}
SocketSetKeepAliveFunction::~SocketSetKeepAliveFunction() {}
bool SocketSetKeepAliveFunction::Prepare() {
- params_ = core_api::socket::SetKeepAlive::Params::Create(*args_);
+ params_ = api::socket::SetKeepAlive::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -691,7 +691,7 @@ SocketSetNoDelayFunction::SocketSetNoDelayFunction() {}
SocketSetNoDelayFunction::~SocketSetNoDelayFunction() {}
bool SocketSetNoDelayFunction::Prepare() {
- params_ = core_api::socket::SetNoDelay::Params::Create(*args_);
+ params_ = api::socket::SetNoDelay::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -711,7 +711,7 @@ SocketGetInfoFunction::SocketGetInfoFunction() {}
SocketGetInfoFunction::~SocketGetInfoFunction() {}
bool SocketGetInfoFunction::Prepare() {
- params_ = core_api::socket::GetInfo::Params::Create(*args_);
+ params_ = api::socket::GetInfo::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -723,13 +723,13 @@ void SocketGetInfoFunction::Work() {
return;
}
- core_api::socket::SocketInfo info;
+ api::socket::SocketInfo info;
// This represents what we know about the socket, and does not call through
// to the system.
if (socket->GetSocketType() == Socket::TYPE_TCP)
- info.socket_type = extensions::core_api::socket::SOCKET_TYPE_TCP;
+ info.socket_type = extensions::api::socket::SOCKET_TYPE_TCP;
else
- info.socket_type = extensions::core_api::socket::SOCKET_TYPE_UDP;
+ info.socket_type = extensions::api::socket::SOCKET_TYPE_UDP;
info.connected = socket->IsConnected();
// Grab the peer address as known by the OS. This and the call below will
@@ -788,20 +788,20 @@ void SocketGetNetworkListFunction::SendResponseOnUIThread(
const net::NetworkInterfaceList& interface_list) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- std::vector<linked_ptr<core_api::socket::NetworkInterface> > create_arg;
+ std::vector<linked_ptr<api::socket::NetworkInterface>> create_arg;
create_arg.reserve(interface_list.size());
for (net::NetworkInterfaceList::const_iterator i = interface_list.begin();
i != interface_list.end();
++i) {
- linked_ptr<core_api::socket::NetworkInterface> info =
- make_linked_ptr(new core_api::socket::NetworkInterface);
+ linked_ptr<api::socket::NetworkInterface> info =
+ make_linked_ptr(new api::socket::NetworkInterface);
info->name = i->name;
info->address = net::IPAddressToString(i->address);
info->prefix_length = i->prefix_length;
create_arg.push_back(info);
}
- results_ = core_api::socket::GetNetworkList::Results::Create(create_arg);
+ results_ = api::socket::GetNetworkList::Results::Create(create_arg);
SendResponse(true);
}
@@ -810,7 +810,7 @@ SocketJoinGroupFunction::SocketJoinGroupFunction() {}
SocketJoinGroupFunction::~SocketJoinGroupFunction() {}
bool SocketJoinGroupFunction::Prepare() {
- params_ = core_api::socket::JoinGroup::Params::Create(*args_);
+ params_ = api::socket::JoinGroup::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -854,7 +854,7 @@ SocketLeaveGroupFunction::SocketLeaveGroupFunction() {}
SocketLeaveGroupFunction::~SocketLeaveGroupFunction() {}
bool SocketLeaveGroupFunction::Prepare() {
- params_ = core_api::socket::LeaveGroup::Params::Create(*args_);
+ params_ = api::socket::LeaveGroup::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -897,7 +897,7 @@ SocketSetMulticastTimeToLiveFunction::SocketSetMulticastTimeToLiveFunction() {}
SocketSetMulticastTimeToLiveFunction::~SocketSetMulticastTimeToLiveFunction() {}
bool SocketSetMulticastTimeToLiveFunction::Prepare() {
- params_ = core_api::socket::SetMulticastTimeToLive::Params::Create(*args_);
+ params_ = api::socket::SetMulticastTimeToLive::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -930,7 +930,7 @@ SocketSetMulticastLoopbackModeFunction::
~SocketSetMulticastLoopbackModeFunction() {}
bool SocketSetMulticastLoopbackModeFunction::Prepare() {
- params_ = core_api::socket::SetMulticastLoopbackMode::Params::Create(*args_);
+ params_ = api::socket::SetMulticastLoopbackMode::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -962,7 +962,7 @@ SocketGetJoinedGroupsFunction::SocketGetJoinedGroupsFunction() {}
SocketGetJoinedGroupsFunction::~SocketGetJoinedGroupsFunction() {}
bool SocketGetJoinedGroupsFunction::Prepare() {
- params_ = core_api::socket::GetJoinedGroups::Params::Create(*args_);
+ params_ = api::socket::GetJoinedGroups::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
return true;
}
@@ -1007,7 +1007,7 @@ SocketSecureFunction::~SocketSecureFunction() {
bool SocketSecureFunction::Prepare() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- params_ = core_api::socket::Secure::Params::Create(*args_);
+ params_ = api::socket::Secure::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
url_request_getter_ = browser_context()->GetRequestContext();
return true;
@@ -1067,7 +1067,7 @@ void SocketSecureFunction::TlsConnectDone(scoped_ptr<TLSSocket> socket,
error_ = net::ErrorToString(result);
}
- results_ = core_api::socket::Secure::Results::Create(result);
+ results_ = api::socket::Secure::Results::Create(result);
AsyncWorkCompleted();
}
« no previous file with comments | « extensions/browser/api/socket/socket_api.h ('k') | extensions/browser/api/socket/tls_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698