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

Side by Side Diff: services/url_response_disk_cache/url_response_disk_cache_app.cc

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "services/url_response_disk_cache/url_response_disk_cache_app.h"
6
7 #include "services/url_response_disk_cache/url_response_disk_cache_impl.h"
8
9 namespace mojo {
10 namespace url_response_disk_cache {
11
12 namespace {
13
14 const size_t kMaxBlockingPoolThreads = 3;
15
16 } // namespace
17
18 URLResponseDiskCacheApp::URLResponseDiskCacheApp() {
19 }
20
21 URLResponseDiskCacheApp::~URLResponseDiskCacheApp() {
22 if (worker_pool_)
23 worker_pool_->Shutdown();
24 }
25
26 bool URLResponseDiskCacheApp::ConfigureIncomingConnection(
27 ApplicationConnection* connection) {
28 connection->AddService<URLResponseDiskCache>(this);
29 return true;
30 }
31
32 void URLResponseDiskCacheApp::Create(
33 ApplicationConnection* connection,
34 InterfaceRequest<URLResponseDiskCache> request) {
35 if (!worker_pool_) {
36 worker_pool_ = new base::SequencedWorkerPool(kMaxBlockingPoolThreads,
37 "URLResponseDiskCachePool");
38 }
39 new URLResponseDiskCacheImpl(
40 worker_pool_, connection->GetRemoteApplicationURL(), request.Pass());
41 }
42
43 } // namespace url_response_disk_cache
44 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698