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

Unified Diff: components/arc/test/fake_app_instance.cc

Issue 2607063002: Remove mojo::Array. (Closed)
Patch Set: Created 3 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: components/arc/test/fake_app_instance.cc
diff --git a/components/arc/test/fake_app_instance.cc b/components/arc/test/fake_app_instance.cc
index 7ae00a6398e824804db1f0c135ae8ddde2904ea2..cce47c7844afc77d322b173339954352d1021afc 100644
--- a/components/arc/test/fake_app_instance.cc
+++ b/components/arc/test/fake_app_instance.cc
@@ -15,7 +15,6 @@
#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "base/run_loop.h"
-#include "mojo/common/common_type_converters.h"
namespace mojo {
@@ -114,7 +113,8 @@ bool FakeAppInstance::GenerateAndSendIcon(const mojom::AppInfo& app,
}
app_host_->OnAppIcon(app.package_name, app.activity, scale_factor,
- mojo::Array<uint8_t>::From(*png_data_as_string));
+ std::vector<uint8_t>(png_data_as_string->begin(),
yzshen1 2017/01/06 19:38:37 It would be nice to avoid such conversion by using
+ png_data_as_string->end()));
return true;
}
@@ -248,7 +248,8 @@ void FakeAppInstance::RequestIcon(const std::string& icon_resource_id,
std::string png_data_as_string;
if (GetFakeIcon(scale_factor, &png_data_as_string)) {
- callback.Run(mojo::Array<uint8_t>::From(png_data_as_string));
+ callback.Run(std::vector<uint8_t>(png_data_as_string.begin(),
+ png_data_as_string.end()));
}
}

Powered by Google App Engine
This is Rietveld 408576698