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

Unified Diff: components/arc/intent_helper/arc_intent_helper_bridge.cc

Issue 2498223002: arc: enable use_new_wrapper_types for intent_helper.mojom (Closed)
Patch Set: rebase Created 4 years, 1 month 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/intent_helper/arc_intent_helper_bridge.cc
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge.cc b/components/arc/intent_helper/arc_intent_helper_bridge.cc
index b691412c6e00863612c455b2230e235936bf3f83..7dcb8be6a9a495ae8f96adf59ffb5e871a3c1e5d 100644
--- a/components/arc/intent_helper/arc_intent_helper_bridge.cc
+++ b/components/arc/intent_helper/arc_intent_helper_bridge.cc
@@ -5,7 +5,6 @@
#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
#include <utility>
-#include <vector>
#include "ash/common/shell_delegate.h"
#include "ash/common/wallpaper/wallpaper_controller.h"
@@ -58,8 +57,7 @@ void ArcIntentHelperBridge::OnInstanceClosed() {
ash::Shell::GetInstance()->set_link_handler_model_factory(nullptr);
}
-void ArcIntentHelperBridge::OnIconInvalidated(
- const mojo::String& package_name) {
+void ArcIntentHelperBridge::OnIconInvalidated(const std::string& package_name) {
DCHECK(thread_checker_.CalledOnValidThread());
icon_loader_->InvalidateIcons(package_name);
}
@@ -73,10 +71,9 @@ void ArcIntentHelperBridge::OnOpenDownloads() {
ash::WmShell::Get()->new_window_client()->OpenFileManager();
}
-void ArcIntentHelperBridge::OnOpenUrl(const mojo::String& url) {
+void ArcIntentHelperBridge::OnOpenUrl(const std::string& url) {
DCHECK(thread_checker_.CalledOnValidThread());
- GURL gurl(url.get());
- ash::WmShell::Get()->delegate()->OpenUrlFromArc(gurl);
+ ash::WmShell::Get()->delegate()->OpenUrlFromArc(GURL(url));
}
void ArcIntentHelperBridge::OpenWallpaperPicker() {
@@ -85,7 +82,7 @@ void ArcIntentHelperBridge::OpenWallpaperPicker() {
}
void ArcIntentHelperBridge::SetWallpaperDeprecated(
- mojo::Array<uint8_t> jpeg_data) {
+ const std::vector<uint8_t>& jpeg_data) {
DCHECK(thread_checker_.CalledOnValidThread());
LOG(ERROR) << "IntentHelper.SetWallpaper is deprecated";
}
@@ -107,12 +104,12 @@ bool ArcIntentHelperBridge::IsIntentHelperPackage(
}
// static
-mojo::Array<mojom::IntentHandlerInfoPtr>
+std::vector<mojom::IntentHandlerInfoPtr>
ArcIntentHelperBridge::FilterOutIntentHelper(
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers) {
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers_filtered;
+ std::vector<mojom::IntentHandlerInfoPtr> handlers) {
+ std::vector<mojom::IntentHandlerInfoPtr> handlers_filtered;
for (auto& handler : handlers) {
- if (IsIntentHelperPackage(handler->package_name.get()))
+ if (IsIntentHelperPackage(handler->package_name))
continue;
handlers_filtered.push_back(std::move(handler));
}
@@ -165,7 +162,7 @@ mojom::IntentHelperInstance* ArcIntentHelperBridge::GetIntentHelperInstance(
}
void ArcIntentHelperBridge::OnIntentFiltersUpdated(
- mojo::Array<mojom::IntentFilterPtr> filters) {
+ std::vector<mojom::IntentFilterPtr> filters) {
DCHECK(thread_checker_.CalledOnValidThread());
activity_resolver_->UpdateIntentFilters(std::move(filters));
}

Powered by Google App Engine
This is Rietveld 408576698