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

Unified Diff: sky/viewer/viewer.cc

Issue 1154223003: NOT FOR COMMIT: POC of using AuthenticatingURLLoader in Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: updated comment Created 5 years, 7 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 | « sky/viewer/content_handler_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/viewer.cc
diff --git a/sky/viewer/viewer.cc b/sky/viewer/viewer.cc
index ce3f949b017ba8ed1f96442296b8079e7e9380e8..cbec761b73627accb99f8f65c90d74bf52308dae 100644
--- a/sky/viewer/viewer.cc
+++ b/sky/viewer/viewer.cc
@@ -13,6 +13,8 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/interface_factory_impl.h"
+#include "mojo/services/authenticating_url_loader/public/interfaces/authenticating_url_loader_factory.mojom.h"
+#include "mojo/services/authentication/public/interfaces/authentication.mojom.h"
#include "mojo/services/content_handler/public/interfaces/content_handler.mojom.h"
#include "sky/engine/public/web/Sky.h"
#include "sky/engine/public/web/WebRuntimeFeatures.h"
@@ -38,8 +40,16 @@ class Viewer : public mojo::ApplicationDelegate,
blink::WebRuntimeFeatures::enableObservatory(!RuntimeFlags::Get().testing());
mojo::NetworkServicePtr network_service;
+ mojo::AuthenticatingURLLoaderFactoryPtr authenticating_url_loader_factory;
app->ConnectToService("mojo:network_service", &network_service);
- platform_impl_.reset(new PlatformImpl(network_service.Pass()));
+ app->ConnectToService("mojo:authenticating_url_loader",
+ &authenticating_url_loader_factory);
+ authentication::AuthenticationServicePtr authentication_service;
+ app->ConnectToService("mojo:authentication", &authentication_service);
+ authenticating_url_loader_factory->SetAuthenticationService(
+ authentication_service.Pass());
+ platform_impl_.reset(new PlatformImpl(
+ network_service.Pass(), authenticating_url_loader_factory.Pass()));
blink::initialize(platform_impl_.get());
mojo::icu::Initialize(app);
« no previous file with comments | « sky/viewer/content_handler_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698