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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_api.h

Issue 690383002: cast channel error cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment and removed extra copy/pasted data 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/cast_channel/cast_channel_api.h
diff --git a/extensions/browser/api/cast_channel/cast_channel_api.h b/extensions/browser/api/cast_channel/cast_channel_api.h
index ebaf41867c7461caa50fc4d44f6b4d9916e30014..b8c0c4e8956f5920ea821dc5e4cb26b614bb6c1c 100644
--- a/extensions/browser/api/cast_channel/cast_channel_api.h
+++ b/extensions/browser/api/cast_channel/cast_channel_api.h
@@ -116,8 +116,14 @@ class CastChannelAsyncApiFunction : public AsyncApiFunction {
void SetResultFromSocket(const cast_channel::CastSocket& socket);
// Sets the function result to a ChannelInfo populated with |channel_id| and
- // |error|.
- void SetResultFromError(int channel_id, cast_channel::ChannelError error);
+ // |channel_error|.
+ void SetResultFromError(int channel_id,
+ cast_channel::ChannelError channel_error);
+
+ // Sets extension lastError to |error| and function result to |channel_error|.
+ void SetChannelError(const std::string& error,
+ cast_channel::ChannelError channel_error =
+ cast_channel::CHANNEL_ERROR_UNKNOWN);
// Returns the socket corresponding to |channel_id| if one exists, or null
// otherwise.
@@ -131,7 +137,7 @@ class CastChannelAsyncApiFunction : public AsyncApiFunction {
ApiResourceManager<cast_channel::CastSocket>* manager_;
// The result of the function.
- cast_channel::ChannelError error_;
+ cast_channel::ChannelError channel_error_;
};
class CastChannelOpenFunction : public CastChannelAsyncApiFunction {

Powered by Google App Engine
This is Rietveld 408576698