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

Unified Diff: chrome/renderer/external_extension.cc

Issue 2072613003: Convert GetSearchProviderInstallState to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small twiddles Created 4 years, 6 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: chrome/renderer/external_extension.cc
diff --git a/chrome/renderer/external_extension.cc b/chrome/renderer/external_extension.cc
index ff616dca7353cc6e378d0010cc77f9a914699f98..875ce222787894bbce628c5676aad18000ebfe6c 100644
--- a/chrome/renderer/external_extension.cc
+++ b/chrome/renderer/external_extension.cc
@@ -9,6 +9,9 @@
#include "base/macros.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/search_provider.h"
+#include "chrome/common/search_provider.mojom.h"
+#include "content/public/common/service_registry.h"
+#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -111,9 +114,13 @@ void ExternalExtensionWrapper::IsSearchProviderInstalled(
GURL inquiry_url = GURL(webframe->document().url()).Resolve(name);
if (!inquiry_url.is_empty()) {
webframe->didCallIsSearchProviderInstalled();
- render_view->Send(new ChromeViewHostMsg_GetSearchProviderInstallState(
- render_view->GetRoutingID(), webframe->document().url(), inquiry_url,
- &install));
+ mojom::SearchProviderInstallStatePtr search_provider_service;
+ content::RenderThread::Get()->GetServiceRegistry()->ConnectToRemoteService(
+ mojo::GetProxy(&search_provider_service));
+ if (!search_provider_service->GetInstallState(webframe->document().url(),
+ inquiry_url, &install)) {
+ DLOG(ERROR) << "Can't fetch search provider install state";
+ }
}
if (install == search_provider::DENIED) {

Powered by Google App Engine
This is Rietveld 408576698