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

Unified Diff: mash/task_viewer/task_viewer.cc

Issue 1743473002: Change Mojo URLs to structured names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@18collapse
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « mash/task_viewer/manifest.json ('k') | mash/wm/apptest_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/task_viewer/task_viewer.cc
diff --git a/mash/task_viewer/task_viewer.cc b/mash/task_viewer/task_viewer.cc
index 1c2340e2291c40d254aa370fb444fc1704538205..948cd1a7233102bc83ce423bdc2924c4f51c4fe2 100644
--- a/mash/task_viewer/task_viewer.cc
+++ b/mash/task_viewer/task_viewer.cc
@@ -144,23 +144,23 @@ class TaskViewerContents
mojo::Array<ApplicationInfoPtr> applications) override {
// This callback should only be called with an empty model.
DCHECK(instances_.empty());
- mojo::Array<mojo::String> urls;
+ mojo::Array<mojo::String> names;
for (size_t i = 0; i < applications.size(); ++i) {
- InsertInstance(applications[i]->id, applications[i]->url,
+ InsertInstance(applications[i]->id, applications[i]->name,
applications[i]->pid);
- urls.push_back(applications[i]->url);
+ names.push_back(applications[i]->name);
}
- catalog_->GetEntries(std::move(urls),
+ catalog_->GetEntries(std::move(names),
base::Bind(&TaskViewerContents::OnGotCatalogEntries,
weak_ptr_factory_.GetWeakPtr()));
}
void ApplicationInstanceCreated(ApplicationInfoPtr application) override {
DCHECK(!ContainsId(application->id));
- InsertInstance(application->id, application->url, application->pid);
+ InsertInstance(application->id, application->name, application->pid);
observer_->OnItemsAdded(static_cast<int>(instances_.size()), 1);
- mojo::Array<mojo::String> urls;
- urls.push_back(application->url);
- catalog_->GetEntries(std::move(urls),
+ mojo::Array<mojo::String> names;
+ names.push_back(application->name);
+ catalog_->GetEntries(std::move(names),
base::Bind(&TaskViewerContents::OnGotCatalogEntries,
weak_ptr_factory_.GetWeakPtr()));
}
@@ -204,7 +204,7 @@ class TaskViewerContents
for (auto it = instances_.begin(); it != instances_.end(); ++it) {
auto entry_it = entries.find((*it)->url);
if (entry_it != entries.end()) {
- (*it)->name = entry_it->second->name;
+ (*it)->name = entry_it->second->display_name;
observer_->OnItemsChanged(
static_cast<int>(it - instances_.begin()), 1);
}
« no previous file with comments | « mash/task_viewer/manifest.json ('k') | mash/wm/apptest_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698