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

Unified Diff: mojo/shell/content_handler_connection.cc

Issue 1307273004: Group ConnectToApplication-related info into a params struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « mojo/shell/content_handler_connection.h ('k') | mojo/shell/identity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/content_handler_connection.cc
diff --git a/mojo/shell/content_handler_connection.cc b/mojo/shell/content_handler_connection.cc
index cf733f6a98fc57fb8907ff586d89460aac3bcd77..99fbb773844b68c52f7f74a58c050faa9f14a13f 100644
--- a/mojo/shell/content_handler_connection.cc
+++ b/mojo/shell/content_handler_connection.cc
@@ -4,16 +4,19 @@
#include "mojo/shell/content_handler_connection.h"
+#include "base/memory/scoped_ptr.h"
#include "mojo/shell/application_manager.h"
+#include "mojo/shell/connect_to_application_params.h"
+#include "mojo/shell/identity.h"
namespace mojo {
namespace shell {
ContentHandlerConnection::ContentHandlerConnection(
- ApplicationInstance* originator,
ApplicationManager* manager,
+ const Identity& originator_identity,
+ const CapabilityFilter& originator_filter,
const GURL& content_handler_url,
- const GURL& requestor_url,
const std::string& qualifier,
const CapabilityFilter& filter,
uint32_t id)
@@ -23,11 +26,17 @@ ContentHandlerConnection::ContentHandlerConnection(
connection_closed_(false),
id_(id) {
ServiceProviderPtr services;
- mojo::URLRequestPtr request(mojo::URLRequest::New());
- request->url = mojo::String::From(content_handler_url.spec());
- manager->ConnectToApplication(
- originator, request.Pass(), qualifier, requestor_url, GetProxy(&services),
- nullptr, filter, base::Closure(), EmptyConnectCallback());
+
+ scoped_ptr<ConnectToApplicationParams> params(new ConnectToApplicationParams);
+ params->set_originator_identity(originator_identity);
+ params->set_originator_filter(originator_filter);
+ params->SetURLInfo(content_handler_url);
+ params->set_qualifier(qualifier);
+ params->set_services(GetProxy(&services));
+ params->set_filter(filter);
+
+ manager->ConnectToApplication(params.Pass());
+
MessagePipe pipe;
content_handler_.Bind(
InterfacePtrInfo<ContentHandler>(pipe.handle0.Pass(), 0u));
« no previous file with comments | « mojo/shell/content_handler_connection.h ('k') | mojo/shell/identity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698