summaryrefslogtreecommitdiffstats
path: root/net/android
Commit message (Collapse)AuthorAgeFilesLines
* [Android] Upstream WebView tests and their dependencies.leandrogracia@chromium.org2012-10-051-2/+8
| | | | | | | | | | | | | These are most of the WebView tests that are pending to be upstreamed. Any references to UrlUtils.getTestHttpUrl had to be migrated to alternative approaches. In order to make the tests work as closest as possible to their originals, we have decided to use TestWebServer whenever possible instead of accessing the files directly to prevent any possible subtle issues related to file:// access. This means that most tests will define their own resources within themselves. Also, some bits of non-WebView code needed to be upstreamed in order to get some of the tests building and passing. BUG=none Review URL: https://chromiumcodereview.appspot.com/11026044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160373 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream singleton consolidation in NetworkChangeNotifierdfalcantara@chromium.org2012-10-041-10/+5
| | | | | | | | | | | Cherry-pick: https://gerrit-int.chromium.org/#/c/25876/ BUG=136984 Review URL: https://chromiumcodereview.appspot.com/11060012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160041 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing end of file new line in NetErrorsTest.java.pliard@chromium.org2012-09-281-1/+1
| | | | | | | | | | | | | | This is part of Chrome for Android upstreaming. Files generally terminate with a newline. When they don't, VIM (and probably others too) automatically insert it anyway. BUG=136750 Review URL: https://chromiumcodereview.appspot.com/11000039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159177 0039d316-1c4b-4281-b951-d872f2087c98
* Fix android build.nileshagrawal@chromium.org2012-09-241-1/+1
| | | | | | | | | | | | Broken after: http://codereview.chromium.org/10974012/ and http://codereview.chromium.org/10968016/ TBR=yfriedman@chromium.org BUG= Review URL: https://codereview.chromium.org/10978009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158435 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Add Java observers to the NetworkChangeNotifierdfalcantara@chromium.org2012-09-243-9/+200
| | | | | | | | | | | | Adds the ability for Java classes to be alerted by the NetworkChangeNotifier instead of having to loop through the native side first. Also adds a test. BUG=136984 Review URL: https://chromiumcodereview.appspot.com/10968016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158432 0039d316-1c4b-4281-b951-d872f2087c98
* Move base Java utils to base/test/android/javatests.nyquist@chromium.org2012-09-242-4/+2
| | | | | | | | | | | | | | | | | | | gyp targets should not depend on tests from other packages, but instead be able to depend on their test utils. The target including the base utilities is called base_java_test_support and contains files from base/test/android/javatests. base_java_test_support was also the name of the wrongly named target for building base/android/javatests, but since only contained util-classes, no new target has been created for tests of base/android/java. BUG=151561,150773 Review URL: https://chromiumcodereview.appspot.com/10974012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158422 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 158067 - Remove native side of content_view_client"yusufo@chromium.org2012-09-221-1/+1
| | | | | | | | | | | | | | The previous CL broke the build, because the changes in net_errors_java.template didn't get the net_error_java target to be rebuilt. We needed a net.gyp change that makes sure NetError.java gets recreated after the changes. BUG=137967 TBR=jam@chromium.org, mkosiba@chromium.org, willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10963041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158146 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 158067 - Remove native side of content_view_clientavi@chromium.org2012-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | This moves related callabcks from content_view_client to web_contents_observer_android and makes the client a Java only API. This broke the compile: http://build.chromium.org/p/chromium.linux/buildstatus?builder=Android%20Builder%20%28dbg%29&number=16035 ErrorCodeConversionHelper, new in this change, failed to build. BUG=137967 Review URL: https://chromiumcodereview.appspot.com/10952029 TBR=yusufo@chromium.org Review URL: https://codereview.chromium.org/10969045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158072 0039d316-1c4b-4281-b951-d872f2087c98
* Remove native side of content_view_clientyusufo@chromium.org2012-09-211-1/+1
| | | | | | | | | | | | This moves related callabcks from content_view_client to web_contents_observer_android and makes the client a Java only API. BUG=137967 Review URL: https://chromiumcodereview.appspot.com/10952029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158067 0039d316-1c4b-4281-b951-d872f2087c98
* Fix race condition in NetworkChangeNotifier on Android.pliard@chromium.org2012-09-206-73/+112
| | | | | | | | | | | | | | | | | NetworkChangeNotifier::GetCurrentConnectionType() is called on any thread, including the network thread. Its implementation on Android calls some Java code (from any thread) which indirectly reads a primitive member variable set from the UI thread. The lack of synchronization could make NetworkChangeNotifier::GetCurrentConnectionType() return an out-dated result on multi-core devices. BUG=143433 Review URL: https://chromiumcodereview.appspot.com/10905264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157804 0039d316-1c4b-4281-b951-d872f2087c98
* Add native-side unit test for Android NetworkChangeNotifierdfalcantara@chromium.org2012-09-209-77/+203
| | | | | | | | | | | | | | * Renames some classes to move them out of the android namespace. * Changes singleton handling in the Java NetworkChangeNotifier. The singleton is unfortunately still required for Android to turn the AutoDetector on. * Adds a native-side unit test to track that the JNI calls are correctly plumbed to alert native-side observers of connection changes. BUG=136984 Review URL: https://chromiumcodereview.appspot.com/10928193 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157687 0039d316-1c4b-4281-b951-d872f2087c98
* Have a clearer error message for Android's GetMimeTypeFromExtensionpeter@chromium.org2012-09-121-1/+2
| | | | | | | | | | | | | The warning is triggered on various layout tests for WebKit, so having a clearer error showing the extension for which we can't get a mime type helps in finding the right solution. BUG= Review URL: https://chromiumcodereview.appspot.com/10911244 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156369 0039d316-1c4b-4281-b951-d872f2087c98
* Implement net::GetNetworkList() for Android.shouqun.liu@intel.com2012-09-123-0/+68
| | | | | | | | | | | | | * Implement net::GetNetworkList() by java.net.NetworkInterface through JNI. * Remove NetUtilTest.GetNetworkList from net_unittests_apk disabled list. BUG= TEST=net_unittests_apk --gtest-filter=NetUtilTest.GetNetworkList Review URL: https://chromiumcodereview.appspot.com/10905207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156257 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Improve NetworkChangeNotifier granularitydfalcantara@chromium.org2012-09-113-40/+100
| | | | | | | | | | | | | | | | | | | Original review: https://chromiumcodereview.appspot.com/10915043/ The NetworkChangeNotifier for Android currently cannot identify what type of connection exists; all it can do is determine whether it's currently got one. This CL patches it so that we pass this information back from the Java side, allowing us to properly use NetworkChangeNotifier::ConnectionType. The connection types (2G, 3G, etc.) are differentiated between using classifications from Android's TelephonyManager. BUG=136984 Review URL: https://chromiumcodereview.appspot.com/10913175 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155881 0039d316-1c4b-4281-b951-d872f2087c98
* Build NetError.java to use in java side tests by preprocessing net_errors.ccyusufo@chromium.org2012-09-102-0/+45
| | | | | | | | | | | | | Java side tests will be using a map to convert these error codes to platform specific ones. This generates a java file which can be used to refer to the errorcode. The included test just does a trivial check whether the java file can be included and used. BUG=137967 Review URL: https://chromiumcodereview.appspot.com/10912136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155796 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream X509Util and AndroidNetworkLibrary refactoring.acleung@google.com2012-08-212-89/+123
| | | | | | | | BUG=142348 Review URL: https://chromiumcodereview.appspot.com/10824337 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152636 0039d316-1c4b-4281-b951-d872f2087c98
* Adding AndroidProxySelectorTest to ContentShellaurimas@chromium.org2012-08-151-0/+322
| | | | | | | | | | | | Adding AndroidProxySelectorTests to the ContentShellTest bundle. These tests are used to check if the proxy settings are functioning correctly. CRBUG=136719 Review URL: https://chromiumcodereview.appspot.com/10830287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151779 0039d316-1c4b-4281-b951-d872f2087c98
* Make jars build from a single ant .xml templatecjhopman@chromium.org2012-08-131-16/+0
| | | | | | | | | | | | | | The ant build files for each of the jars that we create consisted of only fairly straightforward boilerplate. With the recent changes to java.gypi and java_aidl.gypi we can now build these correctly from a single .xml with GYP passing in defines for the minor differences. BUG=136756 Review URL: https://chromiumcodereview.appspot.com/10831227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151334 0039d316-1c4b-4281-b951-d872f2087c98
* Remove extra space in net_jni_registrar.cc.pliard@chromium.org2012-08-131-1/+1
| | | | | | | | | | | This was an unnecessary downstream vs upstream diff. BUG=136750 Review URL: https://chromiumcodereview.appspot.com/10837218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151275 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Add chrome_java target for building Java code in the chromium layer.yfriedman@chromium.org2012-08-061-39/+10
| | | | | | | | | | | Also includes a refactoring of the Ant xml scripts to use a common template (contributed by shashishekhar@chromium.org). As part of this, I also continued Torne's effort of removing our reliance on environment variables. Unfortunately this currently means that you have to specify 5 gyp flags: ANDROID_SDK, ANDROID_SDK_ROOT, ANDROID_SDK_TOOLS, ANDROID_SDK_VERSION, ANDROID_TOOLCHAIN. This'll get better as we make further use of the checked in sdk both upstream and downstream. The problem stems from the android tree and released sdk having different configurations. Review URL: https://chromiumcodereview.appspot.com/10830012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150172 0039d316-1c4b-4281-b951-d872f2087c98
* Android: remove ant environment dependencies.torne@chromium.org2012-08-011-15/+1
| | | | | | | | | | | | | | | | The logic to calculate where the SDK should be is already done by envsetup and made available to gyp as a variable, so just have gyp pass this as a command line argument to ant. The behaviour is identical. This change is to move toward making it possible to build the Android port without having envsetup.sh sourced at build time (only at gyp-generation time), making it more like other platforms. It also simplifies the ant buildfiles. Review URL: https://chromiumcodereview.appspot.com/10821105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149400 0039d316-1c4b-4281-b951-d872f2087c98
* Add yfriedman to several Android OWNERS filesyfriedman@chromium.org2012-07-261-0/+1
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10829023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148555 0039d316-1c4b-4281-b951-d872f2087c98
* Uses gyp "rules" rather than "actions" templates for the JNI generator.bulach@chromium.org2012-07-192-2/+2
| | | | | | | | | | | | | | | | | This allow finer grain control over what is rebuilt. Also, since we have approval over the generated header file name, it greatly simplifies both the generator and also all the gyp files as they no longer need to list the header file and keep in sync with the java file, so the process now is as simple as adding a single java file to the sources. BUG=137069 TEST=build on android Review URL: https://chromiumcodereview.appspot.com/10798010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147515 0039d316-1c4b-4281-b951-d872f2087c98
* refactor code for android haveOnlyLookbackAddressesjames.wei@intel.com2012-07-191-15/+12
| | | | | | | | | | BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10784030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147381 0039d316-1c4b-4281-b951-d872f2087c98
* Adds helper methods for WebView.aurimas@chromium.org2012-07-131-0/+14
| | | | | | | | | | | | Adds some static methods to help webview implementation. INTERNAL-BUG=6741903 BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10706004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146624 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-114-4/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Android's NetworckChangeNotifier.benm@chromium.org2012-07-113-83/+194
| | | | | | | | | | | | | | | The current implementation of NetworkChangeNotifier on Android assumes that the embedder has the Android ACCESS_NETWORK_STATE platform permission, and will crash if it does not. This change refactors the implementation such that the embedder pushes state changes into the NetworkChangeNotfier, and makes the NetworkChangeNotifier a singleton. Review URL: https://chromiumcodereview.appspot.com/10693068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146100 0039d316-1c4b-4281-b951-d872f2087c98
* Move java files into src parent directory.navabi@google.com2012-06-264-1/+1
| | | | | | | | | | BUG=134704 TEST= TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10668039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144272 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for namespace in static JNI methods.bulach@chromium.org2012-06-222-7/+14
| | | | | | | | | | | | | | | | | | | This patch introduces two new annotations for the JNI: @JNINamespace: class-level annotation that indicates all natives methods are in the specified namespace. @NativeClassQualifiedName: method-level annotation that indicates the native method should be bound to the specific class (for instance, OuterContainer::InnerDelegate). This annotation removes the previously used feature of commenting the p0 param with the class name. BUG= TEST=jni_generator_tests Review URL: https://chromiumcodereview.appspot.com/10578035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143569 0039d316-1c4b-4281-b951-d872f2087c98
* implement HaveOnlyLoopbackAddresses() for androidjames.wei@intel.com2012-06-153-0/+41
| | | | | | | | | | BUG=132033 TEST= Review URL: https://chromiumcodereview.appspot.com/10532080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142354 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the ant warning of 'includeantruntime was not set' in android buildshouqun.liu@intel.com2012-06-131-1/+1
| | | | | | | | | | BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10543107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142029 0039d316-1c4b-4281-b951-d872f2087c98
* Make the other Java modules debuggablehaitao.feng@intel.com2012-06-081-1/+1
| | | | | | | | | | BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10541068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141327 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream Android proxy config service.pliard@chromium.org2012-06-063-1/+437
| | | | | | | | | | | | | | This change adds in an Android-specific system proxy provider called ProxyConfigServiceAndroid. This is created as required from C++. In turn ProxyConfigServiceAndroid creates a java object which provides the link to Android's proxy changed broadcast, as well as the functionality to read the Java system properties where the current proxy settings are located. Review URL: https://chromiumcodereview.appspot.com/10206014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140748 0039d316-1c4b-4281-b951-d872f2087c98
* Support for navigator.connection APIdroger@google.com2012-05-242-5/+10
| | | | | | | | | | | | | | | | | | This replaces the online state (a boolean) by a more complex state (UNKNOWN/NONE /2G/3G/4G/WIFI/ETHERNET) inspired by the Network Information API (http://www.w3.org/TR/netinfo-api/). Breakdown of the modified files: - network_change_notifier.h/.cc: actual API change - network_change_notifier_*: platform specific implementations. This CL only provide a basic implementation where CONNECTION_UNKNOWN is returned when online and CONNECTION_NONE is returned when offline. - other files: call sites for the static function and observer implementations. Most of the time this only changes the test IsOffline() by (GetConnectionType() == CONNECTION_NONE). BUG=112937 TEST=NONE Review URL: https://chromiumcodereview.appspot.com/9147026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138780 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded scoped_ptr.h includes from net.thestig@chromium.org2012-05-171-1/+0
| | | | | | | | | BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10383229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137636 0039d316-1c4b-4281-b951-d872f2087c98
* Android content shell bringup.jrg@chromium.org2012-05-101-1/+1
| | | | | | | | | | | | | | | | | | Build media java files (we weren't). Fix adb_install_content_shell for cases where the app was stuck. Add upstream staging gyp var / #define. Be more consistent about jar output files (all in lib.java). Upstream a bunch of random files (e.g. ppapi). Upstream a bunch of java and native code hit as part of shlib init. Properly package jar files in content shell. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10377059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136219 0039d316-1c4b-4281-b951-d872f2087c98
* fix duplicated basename network_change_notifier.cc in net targetjames.wei@intel.com2012-05-104-3/+3
| | | | | | | | | | BUG=126356 TEST= Review URL: https://chromiumcodereview.appspot.com/10384025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136207 0039d316-1c4b-4281-b951-d872f2087c98
* Add net_jni_registrar.yfriedman@chromium.org2012-04-272-0/+47
| | | | | | | | | | It's used as a centralized place to register JNI hooks for Android components in the net package. Review URL: http://codereview.chromium.org/10178023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134396 0039d316-1c4b-4281-b951-d872f2087c98
* Update net/android/network_library.cc with fresher code.yfriedman@chromium.org2012-04-243-57/+178
| | | | | | | | | | Also adds it to the build to ensure it doesn't suffer bit-rot again, and include Java-side component. Review URL: http://codereview.chromium.org/10171009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133591 0039d316-1c4b-4281-b951-d872f2087c98
* Add NetworkChangeNotifier for Android.yfriedman@chromium.org2012-04-207-0/+330
| | | | | | | | | | | | The native notifier spawns a Java-side notifier that registers for notifications from Android's ConnectivityManager. As for the lack of tests, they're written at a higher-level downstream. Review URL: http://codereview.chromium.org/10073024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133142 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream certificate and mime Android implementation.michaelbai@google.com2011-08-112-0/+167
BUG= TEST= Review URL: http://codereview.chromium.org/7538029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96401 0039d316-1c4b-4281-b951-d872f2087c98