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

Side by Side Diff: android_webview/native/android_protocol_handler.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "android_webview/native/android_protocol_handler.h" 5 #include "android_webview/native/android_protocol_handler.h"
6 6
7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" 7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h"
8 #include "android_webview/browser/net/aw_url_request_job_factory.h" 8 #include "android_webview/browser/net/aw_url_request_job_factory.h"
9 #include "android_webview/common/url_constants.h" 9 #include "android_webview/common/url_constants.h"
10 #include "android_webview/native/input_stream_impl.h" 10 #include "android_webview/native/input_stream_impl.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 return new AndroidStreamReaderURLRequestJob( 222 return new AndroidStreamReaderURLRequestJob(
223 request, 223 request,
224 network_delegate, 224 network_delegate,
225 reader_delegate.PassAs<AndroidStreamReaderURLRequestJob::Delegate>()); 225 reader_delegate.PassAs<AndroidStreamReaderURLRequestJob::Delegate>());
226 } 226 }
227 227
228 // AssetFileProtocolHandler --------------------------------------------------- 228 // AssetFileProtocolHandler ---------------------------------------------------
229 229
230 AssetFileProtocolHandler::AssetFileProtocolHandler() 230 AssetFileProtocolHandler::AssetFileProtocolHandler()
231 : asset_prefix_(std::string(content::kFileScheme) + 231 : asset_prefix_(std::string(url::kFileScheme) +
232 std::string(content::kStandardSchemeSeparator) + 232 std::string(content::kStandardSchemeSeparator) +
233 android_webview::kAndroidAssetPath), 233 android_webview::kAndroidAssetPath),
234 resource_prefix_(std::string(content::kFileScheme) + 234 resource_prefix_(std::string(url::kFileScheme) +
235 std::string(content::kStandardSchemeSeparator) + 235 std::string(content::kStandardSchemeSeparator) +
236 android_webview::kAndroidResourcePath) { 236 android_webview::kAndroidResourcePath) {
237 } 237 }
238 238
239 AssetFileProtocolHandler::~AssetFileProtocolHandler() { 239 AssetFileProtocolHandler::~AssetFileProtocolHandler() {
240 } 240 }
241 241
242 bool AssetFileProtocolHandler::CanHandleRequest( 242 bool AssetFileProtocolHandler::CanHandleRequest(
243 const net::URLRequest* request) const { 243 const net::URLRequest* request) const {
244 if (!request->url().SchemeIsFile()) 244 if (!request->url().SchemeIsFile())
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 env, android_webview::kAndroidAssetPath).Release(); 307 env, android_webview::kAndroidAssetPath).Release();
308 } 308 }
309 309
310 static jstring GetAndroidResourcePath(JNIEnv* env, jclass /*clazz*/) { 310 static jstring GetAndroidResourcePath(JNIEnv* env, jclass /*clazz*/) {
311 // OK to release, JNI binding. 311 // OK to release, JNI binding.
312 return ConvertUTF8ToJavaString( 312 return ConvertUTF8ToJavaString(
313 env, android_webview::kAndroidResourcePath).Release(); 313 env, android_webview::kAndroidResourcePath).Release();
314 } 314 }
315 315
316 } // namespace android_webview 316 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698