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

Side by Side Diff: mojo/services/network/network_service_impl.cc

Issue 409883007: Mojo: add support for cookies to HTMLViewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/network/network_service_impl.h" 5 #include "mojo/services/network/network_service_impl.h"
6 6
7 #include "mojo/public/cpp/application/application_connection.h"
8 #include "mojo/services/network/cookie_store_impl.h"
7 #include "mojo/services/network/url_loader_impl.h" 9 #include "mojo/services/network/url_loader_impl.h"
8 10
9 namespace mojo { 11 namespace mojo {
10 12
11 NetworkServiceImpl::NetworkServiceImpl(ApplicationConnection* connection, 13 NetworkServiceImpl::NetworkServiceImpl(ApplicationConnection* connection,
12 NetworkContext* context) 14 NetworkContext* context)
13 : context_(context) { 15 : context_(context),
16 origin_(GURL(connection->GetRemoteApplicationURL()).GetOrigin()) {
14 } 17 }
15 18
16 NetworkServiceImpl::~NetworkServiceImpl() { 19 NetworkServiceImpl::~NetworkServiceImpl() {
17 } 20 }
18 21
19 void NetworkServiceImpl::CreateURLLoader(InterfaceRequest<URLLoader> loader) { 22 void NetworkServiceImpl::CreateURLLoader(InterfaceRequest<URLLoader> loader) {
23 // TODO(darin): Plumb origin_. Use for CORS.
20 BindToRequest(new URLLoaderImpl(context_), &loader); 24 BindToRequest(new URLLoaderImpl(context_), &loader);
21 } 25 }
22 26
27 void NetworkServiceImpl::GetCookieStore(InterfaceRequest<CookieStore> store) {
28 BindToRequest(new CookieStoreImpl(context_, origin_), &store);
29 }
30
23 } // namespace mojo 31 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/network_service_impl.h ('k') | mojo/services/public/interfaces/network/cookie_store.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698