diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 16:53:42 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 16:53:42 +0000 |
commit | ba62fbd428232eee1815d4b4d63fc65cb3ead566 (patch) | |
tree | 56d05f663fe81afc7c7f6c232d1f650994bbe8ed /jingle/notifier/base/static_assert.h | |
parent | a538b1cdbd69c307ef672b5176c8ac9039981c41 (diff) | |
download | chromium_src-ba62fbd428232eee1815d4b4d63fc65cb3ead566.zip chromium_src-ba62fbd428232eee1815d4b4d63fc65cb3ead566.tar.gz chromium_src-ba62fbd428232eee1815d4b4d63fc65cb3ead566.tar.bz2 |
Revert r59012 which started using Chrome sockets for sync.
This caused us to write to ChromeNetLog from the sync thread. ChromeNetLog is not thread safe, so this causes problems.
BUG=55116,54146
TEST=Start up chrome. Does not repeatedly hit DCHECKs on ChromeNetLog::AddEntry().
Review URL: http://codereview.chromium.org/3358028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/notifier/base/static_assert.h')
-rw-r--r-- | jingle/notifier/base/static_assert.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/jingle/notifier/base/static_assert.h b/jingle/notifier/base/static_assert.h new file mode 100644 index 0000000..58a8fe4 --- /dev/null +++ b/jingle/notifier/base/static_assert.h @@ -0,0 +1,21 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef JINGLE_NOTIFIER_BASE_STATIC_ASSERT_H_ +#define JINGLE_NOTIFIER_BASE_STATIC_ASSERT_H_ + +template<bool> struct STATIC_ASSERTION_FAILURE; + +template<> struct STATIC_ASSERTION_FAILURE<true> { + enum { value = 1 }; +}; + +template<int> struct static_assert_test{}; + +#define STATIC_ASSERT(B) \ +typedef static_assert_test<\ + sizeof(STATIC_ASSERTION_FAILURE< (bool)( B ) >)>\ + static_assert_typedef_ ## __LINE__ + +#endif // JINGLE_NOTIFIER_BASE_STATIC_ASSERT_H_ |