summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_switches.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 20:24:48 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 20:24:48 +0000
commit3a76ec1999dc11db01da59a322b0b9f2eceba3b2 (patch)
tree7ecc0eb0c05a3795a245626efcd1ae4f93199983 /chrome/common/chrome_switches.cc
parent2d6e5029ff051a4bb7632c99b575170ba93a0a62 (diff)
downloadchromium_src-3a76ec1999dc11db01da59a322b0b9f2eceba3b2.zip
chromium_src-3a76ec1999dc11db01da59a322b0b9f2eceba3b2.tar.gz
chromium_src-3a76ec1999dc11db01da59a322b0b9f2eceba3b2.tar.bz2
Use chrome/base synchronization primitives and threads instead of
pthreads in SyncerThread. The old pthread impl can be used by specifying --syncer-thread-pthreads for comparison until we settle fully on the final impl (I have a MessageLoop-based impl in progress). The default SyncerThread is as close to the pthreads-impl semantics as I could get, with one exception: it does not offer a time-out when calling Stop(), because it greatly simplifies the implementation. I first implemented it *with* the timeout, and for sake of experimentation while this is in shuffle I am checking it in as SyncerThreadTimedStop, available by using --syncer-thread-timed-stop. I'm not sure which we want ultimately, but it's useful to have around when building the MessageLoop based impl. I had to refactor the interface slightly to allow multiple implementations, I think it will be quite useful while working on the MessageLoop impl. Added several tests to SyncerThreadUnittest, which all impls now pass ( just pass the command line flag to try each out). TEST=SyncerThreadTest, SyncerThreadWithSyncerTest, integration tests Review URL: http://codereview.chromium.org/214033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_switches.cc')
-rw-r--r--chrome/common/chrome_switches.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 075a350..14aea58 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -378,6 +378,16 @@ const wchar_t kEnableFastback[] = L"enable-fastback";
// Enable syncing bookmarks to a Google Account.
const wchar_t kEnableSync[] = L"enable-sync";
+// Use the SyncerThread implementation that matches up with the old pthread
+// impl semantics, but using Chrome synchronization primitives. The only
+// difference between this and the default is that we now have no timeout on
+// Stop(). Should only use if you experience problems with the default.
+const wchar_t kSyncerThreadTimedStop[] = L"syncer-thread-timed-stop";
+
+// Use the old pthreads SyncerThread implementation.
+// Should only use if you experience problems with the default.
+const wchar_t kSyncerThreadPthreads[] = L"syncer-thread-pthreads";
+
// Enable support for SDCH filtering (dictionary based expansion of content).
// Optional argument is *the* only domain name that will have SDCH suppport.
// Default is "-enable-sdch" to advertise SDCH on all domains.