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

Side by Side Diff: mojo/services/network/network_service_delegate.h

Issue 1179413010: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sqlite-fs
Patch Set: Rebase to ToT Created 5 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
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 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ 5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ 6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
7 7
8 #include "base/threading/thread.h"
9 #include "components/filesystem/public/interfaces/file_system.mojom.h"
8 #include "mojo/application/public/cpp/application_delegate.h" 10 #include "mojo/application/public/cpp/application_delegate.h"
9 #include "mojo/application/public/cpp/application_impl.h" 11 #include "mojo/application/public/cpp/application_impl.h"
10 #include "mojo/application/public/cpp/interface_factory.h" 12 #include "mojo/application/public/cpp/interface_factory.h"
11 #include "mojo/services/network/network_context.h" 13 #include "mojo/services/network/network_context.h"
12 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 14 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
13 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h" 15 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
14 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" 16 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h"
15 17
18 namespace sql {
19 class ScopedMojoFilesystemVFS;
20 }
21
16 class NetworkServiceDelegate 22 class NetworkServiceDelegate
17 : public mojo::ApplicationDelegate, 23 : public mojo::ApplicationDelegate,
18 public mojo::InterfaceFactory<mojo::NetworkService>, 24 public mojo::InterfaceFactory<mojo::NetworkService>,
19 public mojo::InterfaceFactory<mojo::URLLoaderFactory> { 25 public mojo::InterfaceFactory<mojo::URLLoaderFactory> {
20 public: 26 public:
21 NetworkServiceDelegate(); 27 NetworkServiceDelegate();
22 ~NetworkServiceDelegate() override; 28 ~NetworkServiceDelegate() override;
23 29
24 private: 30 private:
25 // mojo::ApplicationDelegate implementation. 31 // mojo::ApplicationDelegate implementation.
26 void Initialize(mojo::ApplicationImpl* app) override; 32 void Initialize(mojo::ApplicationImpl* app) override;
27 bool ConfigureIncomingConnection( 33 bool ConfigureIncomingConnection(
28 mojo::ApplicationConnection* connection) override; 34 mojo::ApplicationConnection* connection) override;
29 void Quit() override; 35 void Quit() override;
30 36
31 // mojo::InterfaceFactory<mojo::NetworkService> implementation. 37 // mojo::InterfaceFactory<mojo::NetworkService> implementation.
32 void Create(mojo::ApplicationConnection* connection, 38 void Create(mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<mojo::NetworkService> request) override; 39 mojo::InterfaceRequest<mojo::NetworkService> request) override;
34 40
35 // mojo::InterfaceFactory<mojo::URLLoaderFactory> implementation. 41 // mojo::InterfaceFactory<mojo::URLLoaderFactory> implementation.
36 void Create(mojo::ApplicationConnection* connection, 42 void Create(mojo::ApplicationConnection* connection,
37 mojo::InterfaceRequest<mojo::URLLoaderFactory> request) override; 43 mojo::InterfaceRequest<mojo::URLLoaderFactory> request) override;
38 44
39 private: 45 private:
40 mojo::ApplicationImpl* app_; 46 mojo::ApplicationImpl* app_;
47
48 // A worker thread that blocks for file IO.
49 scoped_ptr<base::Thread> io_worker_thread_;
50
51 // Our connection to the filesystem service, which stores our cookies and
52 // other data.
53 filesystem::FileSystemPtr files_;
54
41 scoped_ptr<mojo::NetworkContext> context_; 55 scoped_ptr<mojo::NetworkContext> context_;
42 }; 56 };
43 57
44 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ 58 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698