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

Unified Diff: services/ui/ws/test_change_tracker.cc

Issue 2607063002: Remove mojo::Array. (Closed)
Patch Set: rebase 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: services/ui/ws/test_change_tracker.cc
diff --git a/services/ui/ws/test_change_tracker.cc b/services/ui/ws/test_change_tracker.cc
index 61e4c0079a46db4421dd730acf14b3a03e64855a..eb393854da009ea9b222a8dc0364d3611714f3c3 100644
--- a/services/ui/ws/test_change_tracker.cc
+++ b/services/ui/ws/test_change_tracker.cc
@@ -8,12 +8,9 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
-#include "mojo/common/common_type_converters.h"
#include "mojo/public/cpp/bindings/map.h"
#include "services/ui/common/util.h"
-using mojo::Array;
-
namespace ui {
namespace ws {
@@ -301,7 +298,7 @@ void TestChangeTracker::OnWindowHierarchyChanged(
Id window_id,
Id old_parent_id,
Id new_parent_id,
- Array<mojom::WindowDataPtr> windows) {
+ std::vector<mojom::WindowDataPtr> windows) {
Change change;
change.type = CHANGE_TYPE_NODE_HIERARCHY_CHANGED;
change.window_id = window_id;
@@ -374,17 +371,18 @@ void TestChangeTracker::OnPointerEventObserved(const ui::Event& event,
AddChange(change);
}
-void TestChangeTracker::OnWindowSharedPropertyChanged(Id window_id,
- const std::string& name,
- Array<uint8_t> data) {
+void TestChangeTracker::OnWindowSharedPropertyChanged(
+ Id window_id,
+ const std::string& name,
+ const base::Optional<std::vector<uint8_t>>& data) {
Change change;
change.type = CHANGE_TYPE_PROPERTY_CHANGED;
change.window_id = window_id;
change.property_key = name;
- if (data.is_null())
+ if (!data)
change.property_value = "NULL";
else
- change.property_value = data.To<std::string>();
+ change.property_value.assign(data->begin(), data->end());
AddChange(change);
}

Powered by Google App Engine
This is Rietveld 408576698