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

Side by Side Diff: shell/android/url_response_disk_cache_delegate_impl.h

Issue 1364243002: Bundle core applicatons in the shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 3 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
« no previous file with comments | « shell/android/main.cc ('k') | shell/android/url_response_disk_cache_delegate_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef SHELL_ANDROID_URL_RESPONSE_DISK_CACHE_DELEGATE_IMPL_H_
6 #define SHELL_ANDROID_URL_RESPONSE_DISK_CACHE_DELEGATE_IMPL_H_
7
8 #include <map>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "services/url_response_disk_cache/url_response_disk_cache_delegate.h"
12 #include "shell/context.h"
13
14 struct AAssetManager;
15
16 namespace shell {
17
18 class URLResponseDiskCacheDelegateImpl
19 : public mojo::URLResponseDiskCacheDelegate {
20 public:
21 URLResponseDiskCacheDelegateImpl(Context* contest, jobject j_asset_manager);
22 ~URLResponseDiskCacheDelegateImpl() override;
23
24 private:
25 // mojo:URLResponseDiskCacheDelegate implementation:
26 void GetInitialPath(scoped_refptr<base::TaskRunner> task_runner,
27 const std::string& url,
28 const base::FilePath& target,
29 const base::Callback<void(bool)>& callback) override;
30
31 bool ExtractAsset(const std::string& asset_name,
32 const base::FilePath& target);
33
34 void PopulateAssetsIfNeeded();
35
36 Context* context_;
37 base::android::ScopedJavaGlobalRef<jobject> j_asset_manager_;
38 std::map<std::string, std::string> url_to_asset_name_;
39 AAssetManager* asset_manager_;
40
41 DISALLOW_COPY_AND_ASSIGN(URLResponseDiskCacheDelegateImpl);
42 };
43
44 } // namespace shell
45
46 #endif // SHELL_ANDROID_URL_RESPONSE_DISK_CACHE_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « shell/android/main.cc ('k') | shell/android/url_response_disk_cache_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698