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

Side by Side Diff: shell/android/android_handler.cc

Issue 1276073004: Offline By Default (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Add missing explicits. 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
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 "shell/android/android_handler.h" 5 #include "shell/android/android_handler.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 bool AndroidHandler::ConfigureIncomingConnection( 132 bool AndroidHandler::ConfigureIncomingConnection(
133 mojo::ApplicationConnection* connection) { 133 mojo::ApplicationConnection* connection) {
134 connection->AddService(&content_handler_factory_); 134 connection->AddService(&content_handler_factory_);
135 return true; 135 return true;
136 } 136 }
137 137
138 void AndroidHandler::ExtractApplication(base::FilePath* extracted_dir, 138 void AndroidHandler::ExtractApplication(base::FilePath* extracted_dir,
139 base::FilePath* cache_dir, 139 base::FilePath* cache_dir,
140 mojo::URLResponsePtr response, 140 mojo::URLResponsePtr response,
141 const base::Closure& callback) { 141 const base::Closure& callback) {
142 url_response_disk_cache_->GetExtractedContent( 142 url_response_disk_cache_->UpdateAndGetExtracted(
143 response.Pass(), 143 response.Pass(),
144 [extracted_dir, cache_dir, callback](mojo::Array<uint8_t> extracted_path, 144 [extracted_dir, cache_dir, callback](mojo::Array<uint8_t> extracted_path,
145 mojo::Array<uint8_t> cache_path) { 145 mojo::Array<uint8_t> cache_path) {
146 if (extracted_path.is_null()) { 146 if (extracted_path.is_null()) {
147 *extracted_dir = base::FilePath(); 147 *extracted_dir = base::FilePath();
148 *cache_dir = base::FilePath(); 148 *cache_dir = base::FilePath();
149 } else { 149 } else {
150 *extracted_dir = base::FilePath( 150 *extracted_dir = base::FilePath(
151 std::string(reinterpret_cast<char*>(&extracted_path.front()), 151 std::string(reinterpret_cast<char*>(&extracted_path.front()),
152 extracted_path.size())); 152 extracted_path.size()));
(...skipping 24 matching lines...) Expand all
177 return ConvertUTF8ToJavaString(env, temporary_file.value()).Release(); 177 return ConvertUTF8ToJavaString(env, temporary_file.value()).Release();
178 } 178 }
179 } 179 }
180 } 180 }
181 181
182 bool RegisterAndroidHandlerJni(JNIEnv* env) { 182 bool RegisterAndroidHandlerJni(JNIEnv* env) {
183 return RegisterNativesImpl(env); 183 return RegisterNativesImpl(env);
184 } 184 }
185 185
186 } // namespace shell 186 } // namespace shell
OLDNEW
« no previous file with comments | « services/url_response_disk_cache/url_response_disk_cache_impl.cc ('k') | shell/application_manager/application_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698