• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2010, The Android Open Source Project
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *  * Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  *  * Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 
26 #ifndef ChromiumIncludes_h
27 #define ChromiumIncludes_h
28 
29 #include "config.h"
30 
31 // Include all external/chromium files in this file so the problems with the LOG
32 // and LOG_ASSERT defines can be handled in one place.
33 
34 // Undefine LOG and LOG_ASSERT before including chrome code, and if they were
35 // defined attempt to set the macros to the Android logging macros (which are
36 // the only ones that actually log).
37 
38 #ifdef LOG
39 #define LOG_WAS_DEFINED LOG
40 #undef LOG
41 #endif
42 
43 #ifdef LOG_ASSERT
44 #define LOG_ASSERT_WAS_DEFINED LOG_ASSERT
45 #undef LOG_ASSERT
46 #endif
47 
48 #include <android/net/android_network_library_impl.h>
49 #include <android/jni/jni_utils.h>
50 #include <base/callback.h>
51 #include <base/memory/ref_counted.h>
52 #include <base/message_loop_proxy.h>
53 #include <base/openssl_util.h>
54 #include <base/string_util.h>
55 #include <base/synchronization/condition_variable.h>
56 #include <base/synchronization/lock.h>
57 #include <base/sys_string_conversions.h>
58 #include <base/threading/thread.h>
59 #include <base/time.h>
60 #include <base/tuple.h>
61 #include <base/utf_string_conversions.h>
62 #include <chrome/browser/net/sqlite_persistent_cookie_store.h>
63 #include <net/base/auth.h>
64 #include <net/base/cert_verifier.h>
65 #include <net/base/cookie_monster.h>
66 #include <net/base/cookie_policy.h>
67 #include <net/base/data_url.h>
68 #include <net/base/host_resolver.h>
69 #include <net/base/io_buffer.h>
70 #include <net/base/load_flags.h>
71 #include <net/base/net_errors.h>
72 #include <net/base/mime_util.h>
73 #include <net/base/net_util.h>
74 #include <net/base/openssl_private_key_store.h>
75 #include <net/base/ssl_cert_request_info.h>
76 #include <net/base/ssl_config_service.h>
77 #include <net/disk_cache/disk_cache.h>
78 #include <net/http/http_auth_handler_factory.h>
79 #include <net/http/http_cache.h>
80 #include <net/http/http_network_layer.h>
81 #include <net/http/http_response_headers.h>
82 #include <net/proxy/proxy_config_service_android.h>
83 #include <net/proxy/proxy_service.h>
84 #include <net/url_request/url_request.h>
85 #include <net/url_request/url_request_context.h>
86 
87 #if ENABLE(WEB_AUTOFILL)
88 #include <autofill/autofill_manager.h>
89 #include <autofill/autofill_profile.h>
90 #include <autofill/personal_data_manager.h>
91 #include <base/logging.h>
92 #include <base/memory/scoped_vector.h>
93 #include <base/string16.h>
94 #include <base/utf_string_conversions.h>
95 #include <chrome/browser/autofill/autofill_host.h>
96 #include <chrome/browser/profiles/profile.h>
97 #include <content/browser/tab_contents/tab_contents.h>
98 #include <webkit/glue/form_data.h>
99 #include <webkit/glue/form_field.h>
100 #endif
101 
102 #undef LOG
103 #if defined(LOG_WAS_DEFINED) && defined(LOG_PRI)
104 #define LOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
105 #endif
106 
107 #undef LOG_ASSERT
108 #if defined(LOG_ASSERT_WAS_DEFINED) && defined(LOG_FATAL_IF)
109 #define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__)
110 #endif
111 
112 #endif
113