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

Unified Diff: extensions/browser/api/serial/serial_connection.h

Issue 820673004: json_schema_compiler: Use std::vector<char> for binary values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify_json_schema
Patch Set: Fix merge error. Created 5 years, 11 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
Index: extensions/browser/api/serial/serial_connection.h
diff --git a/extensions/browser/api/serial/serial_connection.h b/extensions/browser/api/serial/serial_connection.h
index da10b4147ed887a430bd2889dcf6c90a3d749768..cb698efa75f5eef3420591a8fda9ffa1ea2ba353 100644
--- a/extensions/browser/api/serial/serial_connection.h
+++ b/extensions/browser/api/serial/serial_connection.h
@@ -6,6 +6,7 @@
#define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_CONNECTION_H_
#include <string>
+#include <vector>
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
@@ -33,8 +34,8 @@ class SerialConnection : public ApiResource,
// This is the callback type expected by Receive. Note that an error result
// does not necessarily imply an empty |data| string, since a receive may
// complete partially before being interrupted by an error condition.
- typedef base::Callback<
- void(const std::string& data, core_api::serial::ReceiveError error)>
+ typedef base::Callback<void(const std::vector<char>& data,
+ core_api::serial::ReceiveError error)>
ReceiveCompleteCallback;
// This is the callback type expected by Send. Note that an error result
@@ -82,7 +83,8 @@ class SerialConnection : public ApiResource,
// Begins an asynchronous send operation. Calling this while a Send
// is already pending is a no-op and returns |false| without calling
// |callback|.
- bool Send(const std::string& data, const SendCompleteCallback& callback);
+ bool Send(const std::vector<char>& data,
+ const SendCompleteCallback& callback);
// Flushes input and output buffers.
bool Flush() const;
« no previous file with comments | « extensions/browser/api/hid/hid_device_manager.cc ('k') | extensions/browser/api/serial/serial_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698