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

Side by Side Diff: services/authenticating_url_loader/authenticating_url_loader_app.cc

Issue 1155283003: Change AuthenticatingURLLoader to be a URLLoaderInterceptor (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Address review Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/authenticating_url_loader/authenticating_url_loader_app.h" 5 #include "services/authenticating_url_loader/authenticating_url_loader_app.h"
6 6
7 #include "mojo/application/application_runner_chromium.h"
8 #include "mojo/public/c/system/main.h"
7 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
8 #include "services/authenticating_url_loader/authenticating_url_loader_factory_i mpl.h" 10 #include "services/authenticating_url_loader/authenticating_url_loader_factory_i mpl.h"
9 11
10 namespace mojo { 12 namespace mojo {
11 13
12 AuthenticatingURLLoaderApp::AuthenticatingURLLoaderApp() { 14 AuthenticatingURLLoaderApp::AuthenticatingURLLoaderApp() {
13 } 15 }
14 16
15 AuthenticatingURLLoaderApp::~AuthenticatingURLLoaderApp() { 17 AuthenticatingURLLoaderApp::~AuthenticatingURLLoaderApp() {
16 } 18 }
(...skipping 14 matching lines...) Expand all
31 GURL app_url(connection->GetRemoteApplicationURL()); 33 GURL app_url(connection->GetRemoteApplicationURL());
32 GURL app_origin; 34 GURL app_origin;
33 if (app_url.is_valid()) { 35 if (app_url.is_valid()) {
34 app_origin = app_url.GetOrigin(); 36 app_origin = app_url.GetOrigin();
35 } 37 }
36 new AuthenticatingURLLoaderFactoryImpl(request.Pass(), app_, 38 new AuthenticatingURLLoaderFactoryImpl(request.Pass(), app_,
37 &tokens_[app_origin]); 39 &tokens_[app_origin]);
38 } 40 }
39 41
40 } // namespace mojo 42 } // namespace mojo
43
44 MojoResult MojoMain(MojoHandle application_request) {
45 mojo::ApplicationRunnerChromium runner(new mojo::AuthenticatingURLLoaderApp);
46 return runner.Run(application_request);
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698