0
Commit Graph

643 Commits

Author SHA1 Message Date
42ea87098d Fix scoped_cftyperef<>::reset() to adopt the incoming CFTypeRef when the
existing stored pointer is NULL.
Review URL: http://codereview.chromium.org/9130

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4646 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-04 20:57:05 +00:00
1b5753a678 Turn time_mac.cc back on, with workaround for scoped_cftyperef reset bug
Review URL: http://codereview.chromium.org/9342

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4641 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-04 20:36:11 +00:00
cd378ab1cd Handle time overflow more gracefully in base/time_posix.cc. Instead of
asserting when encountering time overflow, use the most distant future or past
time representation possible.  This fixes assertions that occur when handling
cookies that expire well in the future.
Review URL: http://codereview.chromium.org/8771

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4631 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-04 19:45:51 +00:00
4bc9e808de Use CreateThread instead of _beginthreadex. This should still be safe, and we'll see if it makes a noticable impact on startup time.
Review URL: http://codereview.chromium.org/9059

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4580 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-04 07:59:37 +00:00
fc2cdc1f00 Fix tree breakage.
TBR=paulg

Review URL: http://codereview.chromium.org/9290

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4524 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-04 00:29:16 +00:00
eef576fd62 Remove fragile check in DidProcessCrash
- the numbers were out of sync with result_codes.h
- can't use result_codes.h in base project so I extracted
the generic part of it.

Rahul: I hope I don't break installer assumptions here.
Dan: don't feel obligated to review.

Review URL: http://codereview.chromium.org/9012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4519 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 23:28:06 +00:00
82fc7c72f6 Get url_request_unittest.cc to build on Linux.
See http://code.google.com/p/chromium/issues/detail?id=3661

Also change LaunchApp to check PATH, 
and fixed a useful gcc-4.3 warning re operator precedence.

Review URL: http://codereview.chromium.org/7968

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4515 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 23:17:33 +00:00
ed931012a5 Undisable the now not-flaky unittests!
Review URL: http://codereview.chromium.org/9264

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4513 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 23:14:56 +00:00
39f729fe20 Revert r4473 to fix build breakage (local time zone tests failed)
TBR mmentovai@chromium.org
Review URL: http://codereview.chromium.org/9274

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4496 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 21:47:07 +00:00
2c3863845e Switch from the benighted PlatformThread to the shiny SimpleThread
Also add a comment to explain the strange tls gyrations in
SlotReturnFunction.

Review URL: http://codereview.chromium.org/8972

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4481 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 20:08:45 +00:00
c2b11ae3be Add a TODO from Jar.
Review URL: http://codereview.chromium.org/9262

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4475 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 19:45:23 +00:00
8822d9730d Update Mac implemention of Time to prevent problems with
times later than the UNIX epoch 32 bit rollover in 2038 (such as
cookie expirations).  time_t is only 32 bits in MacOS X, so
we can't just use time_posix.cc
Review URL: http://codereview.chromium.org/9249

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4473 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 19:36:59 +00:00
9999b28465 Update idle timer test to use longer intervals.
This should increase reliability issues seen on
the bbots.

Review URL: http://codereview.chromium.org/9261

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4471 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 19:28:59 +00:00
e7d404600b Weee. More TODO(darin)s. :)
Disabled two flaky unittests.
Review URL: http://codereview.chromium.org/9258

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4468 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 19:01:29 +00:00
821f5033f6 The base unittests were succeeding for the isolated
tests, but failed when all tests were run because
some tests run without a message loop.  The 
observer_list_threadsafe allowed AddObserver to run
with null message loops.  But, if you call Notify
after doing so, then the notify call would attempt
to use the registered "null" ptr to a message loop.

This crashed, of course.

Review URL: http://codereview.chromium.org/9045

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4459 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 18:15:16 +00:00
1252dad25c Fix unit test for system monitor.
Not sure how I missed this!

Review URL: http://codereview.chromium.org/9250

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4457 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 18:00:29 +00:00
36cb8b8dcf quick build fix for Linux
TBR=sgk

Review URL: http://codereview.chromium.org/9043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4455 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 17:30:03 +00:00
21da6eb1f8 * Add write and read/write support to FileStream (renamed from FileInputStream).
* Moved net/disk_cache/os_file to base/platform_file.

Review URL: http://codereview.chromium.org/8843

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4454 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 17:18:14 +00:00
67bdbe0e44 Make the SystemMonitor observer list thread safe.
This is done by using the new observer_list_threadsafe.

Review URL: http://codereview.chromium.org/4288

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4452 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 17:15:07 +00:00
52ab8f9091 Always show file extensions in the shelf.
BUG=1208

Review URL: http://codereview.chromium.org/8991

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4450 0039d316-1c4b-4281-b951-d872f2087c98
2008-11-03 16:14:46 +00:00
021b2b6263 Fix compilation error on Windows and link error on Mac
Review URL: http://codereview.chromium.org/8781

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4320 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-31 20:58:55 +00:00
ab0e2220a2 Port GetProcessCount(), KillProcesses(), and CleanupProcesses().
Also switch to fork() from vfork(), since strace on my box
doesn't support vfork!  It's deprecated, anyway.

Review URL: http://codereview.chromium.org/8880

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4315 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-31 20:19:43 +00:00
bb47a94f2a Port last remaining test case in base/stats_table_unittest.cc, and
fix the bug it exposes on posix in StatsTable, i.e.
UnregisterThread() breaks when called inside SlotReturnFunction()
on posix because posix clears tls data before calling destructor.

Review URL: http://codereview.chromium.org/8751

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4309 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-31 19:21:34 +00:00
b3e2fad0a1 Adds the ability for ObserverList to not notify observers added during
notification. I need this for bookmarks. If a new observer is added
while the bookmark model is in the process of sending out notification
the newly added observer gets confused.

BUG=674
TEST=none

Review URL: http://codereview.chromium.org/8919

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4267 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-31 03:32:06 +00:00
4a2952faa6 AbsolutePath should probably also work on non-Windows platforms.
Review URL: http://codereview.chromium.org/8949


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4264 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-31 02:03:07 +00:00
52d71ad0e3 AbsolutePath should probably actually use its input somewhere.
Review URL: http://codereview.chromium.org/8948


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4263 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-31 01:49:48 +00:00
f6cda7598f Switch to using the message loop rather than gtk_main().
Include more code from the main test_shell.cc into the GTK version. Wherever
possible the code has been copied and pasted in directly to make the future
merge easy.

Review URL: http://codereview.chromium.org/8670


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4255 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-30 23:54:26 +00:00
640517fdd2 Begin the first small step towards using FilePath everywhere:
- Add some transition APIs.
- Start migrating some code to transition APIs.

Review URL: http://codereview.chromium.org/8825


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4254 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-30 23:54:04 +00:00
82cf6c7f46 Fix build bustage - remove reference to exported_sybmols file.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4175 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-29 22:10:13 +00:00
307f536386 1) Add a new MULTIPROCESS_TEST_MAIN macro to store child process names
in a lookup table.

Previously we were using different mechanisms on each platform to look up
child process names at runtime.  This broke on OS X where we strip the symbol
table on release executables.

2) Enable process_util_unittest on OS X.

Review URL: http://codereview.chromium.org/8864

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4165 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-29 20:46:04 +00:00
13dbd131b1 System includes need to use angle brackets for check_deps
TBR=tc

Review URL: http://codereview.chromium.org/8706


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4141 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-29 18:17:02 +00:00
c09b65412f Start writing the GTK code for test_shell.
Review URL: http://codereview.chromium.org/8000


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4136 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-29 18:07:56 +00:00
f7dadf7909 Removed magic number for owner rights, avoid to call close(-1).
Patch committed for mendola@gmail.com

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4128 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-29 17:01:22 +00:00
7d562b202c * Revert "Start writing the GTK code for test_shell."
This reverts commit 54dfed3ab933cea7492ae1ed2f35cdbfe822e8a4.

Review URL: http://codereview.chromium.org/8839


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4072 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-28 17:49:06 +00:00
4a056cba8e Start writing the GTK code for test_shell.
Review URL: http://codereview.chromium.org/8000


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4071 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-28 17:39:08 +00:00
6a32e8ffd7 Roll back project file portion of r4024. The unit test is not ready on Mac
OS X, it fails in release mode.
Review URL: http://codereview.chromium.org/8662

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4067 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-28 16:22:35 +00:00
87e2a554be Add base\field_trial_unittest.cc to the SCons build.
Review URL: http://codereview.chromium.org/8650

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4057 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-28 05:43:09 +00:00
f07cc2ebf9 Add a file I forgot in the last change.
Review URL: http://codereview.chromium.org/8637


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4035 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 22:58:40 +00:00
dca5cbb44a Port a few test_shell_tests. Now it runs 45 of them.
I removed some files from test_files because scons complains (warns)
when a file is both in test_files and input_files. So the files removed from
test_files also exist in input_files and at some pointed will be ported anyway.

I also made some linking stubs.

BUG=3674

Review URL: http://codereview.chromium.org/7974
Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>.


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4031 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 22:46:31 +00:00
13c11698f3 fix linux build by making sure APICALL is defined on
all platforms

TBR=jeremy

Review URL: http://codereview.chromium.org/8805


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4028 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 22:19:41 +00:00
8051fc4158 Disable flaky test IdleTimerTest.RepeatIdleReset
Review URL: http://codereview.chromium.org/8632

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4025 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 20:57:51 +00:00
9c73c775a1 Enable stats_tabe_unittest.cc on OS X.
Review URL: http://codereview.chromium.org/8160

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4024 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 20:49:55 +00:00
e1acf6f902 Move Time, TimeDelta and TimeTicks into namespace base.
Review URL: http://codereview.chromium.org/7995

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 20:43:33 +00:00
b099217a85 Lint message loop code (added explicit to a class definition)
Incidental lint of code noted the need for explicit... so I tossed it in.

r=mbelshe
Review URL: http://codereview.chromium.org/8623

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4014 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 18:54:18 +00:00
423041b0a7 Clean up filter and content encoding handling
Centralize translation functions (text of "Content-Encoding" to enum) 
in filter.cc

Centralize error recovery (for damaged content encoding headers) in filter.cc
Error recovery includes a loss of SDCH encoding headers, plus handling
of Apache server bug with gzip files are tagged as also being gzip encoded.

Centralize and add a pile of unit tests to this filter code.

r=openvcdiff,huanr
Review URL: http://codereview.chromium.org/8018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4004 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 17:39:28 +00:00
ce16adb506 Make sure it's possible to download to a network share.
The function to move the file was failing to set the
security descriptor. Now we use SHFileOperation, which
has a flag to do everything we want.

Eventually we might want to display ui on errors and
use the ui features of SHFileOperation, but for the
1.0 build we want to stick to a smaller and less risky
change.

BUG: 984
Review URL: http://codereview.chromium.org/8128

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3996 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-27 14:41:51 +00:00
7002ac6566 Fix SCons modules build on Windows:
* Add 'midl' Tool module.
* Filter out the default OS_WINDOWS= definition from the Hammer
  modules, which messes up our build.
* Fix the $PLATFORMSDK_VISTA definition.
* Remove the current directory from the 'base' Alias (avoid cycles).
* Remove by-hand addition of .lib, .pdb and .ilk files to the target
  list when build shared libraries (multiple places).
* Comment out a post-action Touch() of the themes/default resource.
(Thanks to bradnelson for many of the above individual fixes.)
Review URL: http://codereview.chromium.org/8207

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3980 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-25 17:20:48 +00:00
3cdb7af81d Make IPC::SyncChannel not duplicate the underlying MessageLoop implementation by pumping messages on its own. This fixes the problem of windowless plugins not painting on right click, and generally makes this class almost ported, other than using a generic version of events/locks.Through this change I've also cleaned up the class and hopefully made it more understandable.
Review URL: http://codereview.chromium.org/8001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3934 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-24 19:21:13 +00:00
4412e74006 Add field trial support to base on the Mac
Review URL: http://codereview.chromium.org/7927

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3830 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-23 18:38:14 +00:00
d1bf2aa00c Simultaneously store multiple formats on the linux clipboard.
Review URL: http://codereview.chromium.org/8038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3819 0039d316-1c4b-4281-b951-d872f2087c98
2008-10-23 17:35:11 +00:00