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

Side by Side Diff: android_webview/lib/main/webview_entry_point.cc

Issue 136723010: Android WebView: initialize url_util safely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 #include "android_webview/native/android_webview_jni_registrar.h" 6 #include "android_webview/native/android_webview_jni_registrar.h"
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h" 8 #include "base/android/jni_registrar.h"
9 #include "components/navigation_interception/component_jni_registrar.h" 9 #include "components/navigation_interception/component_jni_registrar.h"
10 #include "components/web_contents_delegate_android/component_jni_registrar.h" 10 #include "components/web_contents_delegate_android/component_jni_registrar.h"
11 #include "content/public/app/android_library_loader_hooks.h" 11 #include "content/public/app/android_library_loader_hooks.h"
12 #include "content/public/app/content_main.h" 12 #include "content/public/app/content_main.h"
13 #include "url/url_util.h"
13 14
14 static base::android::RegistrationMethod 15 static base::android::RegistrationMethod
15 kWebViewDependencyRegisteredMethods[] = { 16 kWebViewDependencyRegisteredMethods[] = {
16 { "NavigationInterception", 17 { "NavigationInterception",
17 navigation_interception::RegisterNavigationInterceptionJni }, 18 navigation_interception::RegisterNavigationInterceptionJni },
18 { "WebContentsDelegateAndroid", 19 { "WebContentsDelegateAndroid",
19 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni }, 20 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni },
20 }; 21 };
21 22
22 // This is called by the VM when the shared library is first loaded. 23 // This is called by the VM when the shared library is first loaded.
(...skipping 14 matching lines...) Expand all
37 env, 38 env,
38 kWebViewDependencyRegisteredMethods, 39 kWebViewDependencyRegisteredMethods,
39 arraysize(kWebViewDependencyRegisteredMethods))) 40 arraysize(kWebViewDependencyRegisteredMethods)))
40 return -1; 41 return -1;
41 42
42 if (!android_webview::RegisterJni(env)) 43 if (!android_webview::RegisterJni(env))
43 return -1; 44 return -1;
44 45
45 content::SetContentMainDelegate(new android_webview::AwMainDelegate()); 46 content::SetContentMainDelegate(new android_webview::AwMainDelegate());
46 47
48 // Initialize url_util here while we are still single-threaded, in case we use
49 // CookieManager before initializing Chromium (which would normally have done
50 // this). It's safe to call this multiple times.
51 url_util::Initialize();
52
47 return JNI_VERSION_1_4; 53 return JNI_VERSION_1_4;
48 } 54 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698