diff options
author | pneubeck <pneubeck@chromium.org> | 2015-01-20 03:26:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-20 11:27:44 +0000 |
commit | 93871258123f9c02d00dc33ff96d1d4a240fae68 (patch) | |
tree | a243b86743759762851e652b58e543c1d636bca2 /chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc | |
parent | f97f8f3fb09375cf82874a96e5ce45b8c8838182 (diff) | |
download | chromium_src-93871258123f9c02d00dc33ff96d1d4a240fae68.zip chromium_src-93871258123f9c02d00dc33ff96d1d4a240fae68.tar.gz chromium_src-93871258123f9c02d00dc33ff96d1d4a240fae68.tar.bz2 |
json_schema_compiler: Use std::vector<char> for binary values.
This change enables ArrayBuffer[] in IDLs / json-schema descriptions of extension APIs.
This affects the code generated from these descriptions:
The C++ members (and arguments to the ::Create functions) that refer to binary values are now represented by std::vector<char> instead of std::string.
All usages are adapted in this CL.
While there, this change updates the affected code parts
- to use vector_as_array where it makes sense
- unnecessary copies are removed where easily possible
- and range based assigns ( ::assign(InputIterator first, InputIterator last) or the same with c'tors) are uniformly used.
BUG=448383
TBR=stevenjb@chromium.org (chromeos/dbus was reviewed by bartfab@)
Review URL: https://codereview.chromium.org/820673004
Cr-Commit-Position: refs/heads/master@{#312183}
Diffstat (limited to 'chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc')
-rw-r--r-- | chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc index 8be3db3..90d6ebda 100644 --- a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc +++ b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc @@ -57,7 +57,7 @@ void FakeShillThirdPartyVpnDriverClient::UpdateConnectionState( void FakeShillThirdPartyVpnDriverClient::SendPacket( const std::string& object_path_value, - const std::string& ip_packet, + const std::vector<char>& ip_packet, const base::Closure& callback, const ShillClientHelper::ErrorCallback& error_callback) { base::MessageLoop::current()->PostTask(FROM_HERE, callback); @@ -65,7 +65,7 @@ void FakeShillThirdPartyVpnDriverClient::SendPacket( void FakeShillThirdPartyVpnDriverClient::OnPacketReceived( const std::string& object_path_value, - const std::string& packet) { + const std::vector<char>& packet) { ObserverMap::iterator it = observer_map_.find(object_path_value); if (it == observer_map_.end()) { LOG(ERROR) << "Unexpected OnPacketReceived for " << object_path_value; |