| Index: chrome/browser/extensions/api/copresence/copresence_translations.cc
|
| diff --git a/chrome/browser/extensions/api/copresence/copresence_translations.cc b/chrome/browser/extensions/api/copresence/copresence_translations.cc
|
| index 77a0d9f3a68e4affc10e0df5544f8d97fb11ebfc..492e6c2b5b32d9f9540346556cd0561062fb2929 100644
|
| --- a/chrome/browser/extensions/api/copresence/copresence_translations.cc
|
| +++ b/chrome/browser/extensions/api/copresence/copresence_translations.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/extensions/api/copresence/copresence_translations.h"
|
|
|
| +#include "base/stl_util.h"
|
| #include "chrome/common/extensions/api/copresence.h"
|
| #include "components/copresence/proto/data.pb.h"
|
| #include "components/copresence/proto/enums.pb.h"
|
| @@ -89,7 +90,9 @@ bool AddPublishToRequest(const std::string& app_id,
|
| publish_proto->set_id(publish.id);
|
| publish_proto->mutable_message()->mutable_type()->set_type(
|
| publish.message.type);
|
| - publish_proto->mutable_message()->set_payload(publish.message.payload);
|
| + publish_proto->mutable_message()->set_payload(
|
| + vector_as_array(&publish.message.payload),
|
| + publish.message.payload.size());
|
|
|
| int ttl = SanitizeTtl(publish.time_to_live_millis.get());
|
| if (ttl < 0)
|
| @@ -101,7 +104,8 @@ bool AddPublishToRequest(const std::string& app_id,
|
| publish_proto->mutable_token_exchange_strategy());
|
|
|
| DVLOG(2) << "Publishing message of type " << publish.message.type << ":\n"
|
| - << publish.message.payload;
|
| + << std::string(publish.message.payload.begin(),
|
| + publish.message.payload.end());
|
| // TODO(ckehoe): Validate that required fields are non-empty, etc.
|
| return true;
|
| }
|
|
|