Commit Graph

46 Commits

Author SHA1 Message Date
Minh Nguyễn
d474f35371 Check account type before comparing hostname 2015-05-19 14:33:19 -07:00
Minh Nguyễn
52670f0560 Cache account type user default 2015-05-19 14:31:30 -07:00
Minh Nguyễn
90b70180c5 Compare hostname for adding events=true
ref #1596, #1599
2015-05-19 13:44:29 -07:00
Brad Leege
ec4cd494cb #1596 - Adding mapbox.com checking to http requests 2015-05-19 14:23:21 -05:00
Minh Nguyễn
bb788f56f2 Renamed settings keys
The new keys fit the standard naming convention for Info.plist keys and more clearly communicate how they’re to be used.
2015-05-08 11:51:48 -07:00
Minh Nguyễn
ec241d17ff Fixed NSMutableString leak
Fixed analyzer warnings in http-nsurl target, which is MRR rather than ARC.
2015-05-05 11:33:39 -04:00
Konstantin Käfer
27d8e82e1c lower thread priority of worker threads 2015-05-04 17:33:05 +02:00
John Firebaugh
64251eec75 Introduce and use uv::timer 2015-04-30 12:40:10 -04:00
John Firebaugh
95214472d4 Use uv::async 2015-04-30 12:02:41 -04:00
John Firebaugh
481fa0e69f Restructure *Request and Context
The previous implementation, based on thread-local storage, did not
ensure that the context was destructed before the FileSource run loop.
This resulted in implementations attempting to uv_close handles for a
loop that had already been destroyed.

This change also fixes #1262.
2015-04-28 19:26:35 -04:00
John Firebaugh
8e5fa341eb Remove RequestBase::start
Requests are always started immediately upon construction.

While here, use typed pointers, not void*.
2015-04-28 09:16:26 -04:00
John Firebaugh
cdd8f3ac32 Separate RequestBase from DefaultFileSource internals
SharedRequestBase was trying to do two different jobs: be a base class
for Asset/HttpRequest and track internal state for DefaultFileSource.

Now we have RequestBase for the former, and DefaultFileRequest for the
latter.
2015-04-28 09:16:26 -04:00
John Firebaugh
f4adef1889 pointer ⇢ reference 2015-04-28 09:16:25 -04:00
Konstantin Käfer
452d12e6e6 make implementation files private headers 2015-04-13 18:28:18 +02:00
Konstantin Käfer
16849a341b hide Thread<> and separate the Implementation object 2015-04-13 17:57:45 +02:00
Konstantin Käfer
4c7132337f convert DefaultFileSource to use util::Thread<> 2015-04-10 22:37:27 +02:00
Brad Leege
94bc3c811f #1185 - Adding "events=true" query string to all non metrics http requests if metrics are not disabled 2015-04-02 16:15:25 -05:00
Justin R. Miller
f3058dbc9a closes #1082, refs #756: user dot on map in iOS 2015-03-25 17:48:22 -07:00
Thiago Marcos P. Santos
3254cdc85c Log the Environment ID and the Thread name
To make it easier to debug, add the Environment ID and the Thread name
to the log messages. For instance log messages from the TileParser will look like:

[WARNING] {0}{TileWorker_15/18653/9486}[ParseTile]: some relevant warning message
   |       |             |                  |
   |       |             |                  +-> Component
   |       |             +--------------------> Thread name
   |       +----------------------------------> Environment ID
   +------------------------------------------> Severity level

Log messages that are not inside an Environment::Scope will work
normally and will look like:

[WARNING] [JNI]: some relevant warning message

Fixes #882.
2015-03-18 12:51:33 +01:00
Minh Nguyễn
3ba72da74f Look inside MapboxGL.bundle when present
Fixes #1011.
2015-03-16 16:22:16 -07:00
Thiago Marcos P. Santos
51bc265db3 Make the logging system static
No initialization is needed anymore and we can use the logging functions
safely at any point of the code (threading is not handled though, so you
might get multiplexed messages if you log from two threads
simultaneously).
2015-03-12 13:28:41 +02:00
Thiago Marcos P. Santos
2948e7d121 Simplify the logging mechanism
Move the implementation of the more specialized methods to the base
class and let the platform implement only the most generic method that
takes all the possible arguments.

These specialized methods will then map to the generic implementation
that must be provided by the platforms we support.
2015-03-12 13:28:40 +02:00
Konstantin Käfer
9781785ab7 scope Requests to an Environment object for easier cancelation
we are now scoping all file requests to an environment object. The FileSource implementation treats
this as an opaque pointer, but allows canceling all Requests that are associated with that pointer.
This is necessary to abort all file requests that originated from a particular Map object. Aborting
a file request is different from canceling a file request: A canceled request doesn't have its
callback called, while an aborted request will have its callback called with an error, indicating
that the environment is going to be shut down.
2015-03-06 08:21:47 -08:00
Konstantin Käfer
8c0acecbe3 fix handling around unique_ptr releases 2015-03-06 16:17:49 +01:00
Justin R. Miller
d4d4cd4415 move iOS code from gl-cocoa to this project 2015-02-09 18:01:40 -08:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Konstantin Käfer
9a549094e0 make ios compile 2015-02-04 10:49:06 +01:00
Konstantin Käfer
bf629c97db cancel the backoff timer when the request is canceled 2015-02-04 10:49:06 +01:00
Konstantin Käfer
31a0d18ca1 remove circular shared_ptr and a few other memory leaks 2015-02-04 10:49:05 +01:00
Konstantin Käfer
5602ba2f07 do not leak string handles 2015-02-04 10:46:37 +01:00
Konstantin Käfer
b9bf66e67e rewrite storage layer to be independent of the Map's event loop 2015-02-04 10:46:37 +01:00
Leith Bade
40f859e482 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	gyp/mbgl-ios.gypi
	gyp/mbgl-osx.gypi
	platform/default/asset_request_libuv.cpp
	src/mbgl/storage/caching_http_file_source.cpp
	src/mbgl/storage/file_request.cpp
	src/mbgl/storage/file_request.hpp
	src/mbgl/storage/file_request_baton.hpp
2014-12-18 12:39:36 +11:00
Konstantin Käfer
b5e9998b15 change file:// to asset:// to indicate that they aren't arbitrary files
refs #579
2014-12-17 14:59:05 +01:00
Leith Bade
69cd7268d7 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	platform/default/http_request_baton_curl.cpp
2014-12-10 19:13:21 +11:00
Konstantin Käfer
e11c073e51 report version number in user agent string
refs #628
2014-12-08 16:21:15 +01:00
Konstantin Käfer
1f91be988b add user agent header
fixes #628
2014-12-08 11:04:08 +01:00
Leith Bade
8f1754cf0a Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	include/mbgl/storage/base_request.hpp
	include/mbgl/storage/file_request_baton.hpp
	include/mbgl/storage/http_request.hpp
	include/mbgl/storage/http_request_baton.hpp
	include/mbgl/util/uv_detail.hpp
	platform/darwin/http_request_baton_cocoa.mm
	platform/default/caching_http_file_source.cpp
	platform/default/http_request_baton_curl.cpp
	src/map/map.cpp
	src/storage/base_request.cpp
	src/storage/file_request.cpp
	src/storage/file_request_baton.cpp
	src/storage/http_request.cpp
	src/storage/http_request_baton.cpp
2014-12-04 22:19:46 +11:00
John Firebaugh
57249ca32c Prefer stdlib to libuv (fixes #688) 2014-12-03 17:38:10 -08:00
Leith Bade
94d34ce7ac Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	src/map/map.cpp
2014-12-03 22:02:55 +11:00
Leith Bade
f090d6b264 Use uv::async and various other fixes 2014-12-03 21:57:55 +11:00
Konstantin Käfer
82f3574d09 add array overloads to make_unique and move it to mbgl::util from std 2014-12-03 11:27:24 +01:00
Konstantin Käfer
37afa5af5b explicitly cast to 32 bit integer 2014-11-06 15:40:16 +01:00
Konstantin Käfer
0e3f111a79 also use custom formatter for OS X 2014-11-04 16:35:08 +01:00
Konstantin Käfer
e3bc69b7e7 use CoreImage for decoding/encoding images on osx/ios 2014-10-30 12:02:28 -04:00
Konstantin Käfer
0e928b5204 make tests work 2014-10-24 17:44:51 +02:00
Konstantin Käfer
cd9a89257a restructure gyp files 2014-10-24 16:40:08 +02:00