summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/socket/socket_api.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-28 01:19:37 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-28 01:19:37 +0000
commit13b94c9b8b91f1ef5ec810e880ac9bc9d9d18fcf (patch)
tree9cc8bfafe9f20ec91e28f0a6007d2e2da0b75b2c /chrome/browser/extensions/api/socket/socket_api.cc
parent8d425e4443e7aab32f9942d164e40dbf1cf7b1b4 (diff)
downloadchromium_src-13b94c9b8b91f1ef5ec810e880ac9bc9d9d18fcf.zip
chromium_src-13b94c9b8b91f1ef5ec810e880ac9bc9d9d18fcf.tar.gz
chromium_src-13b94c9b8b91f1ef5ec810e880ac9bc9d9d18fcf.tar.bz2
Revert 148856 (broke mac, asan, linux cros bots)
cc1plus: warnings being treated as errors ./chrome/browser/extensions/api/api_resource_manager.h: In member function 'void extensions::TestExtensionSystem::CreateSocketManager()': ./chrome/browser/extensions/api/api_resource_manager.h:28:error: 'id' is used uninitialized in this function chrome/browser/extensions/test_extension_system.cc:55: note: 'id' was declared here /b/build/slave/cr-mac-rel/build/src/chrome/browser/extensions/test_extension_system.cc:56:3:error: variable 'id' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] DCHECK(BrowserThread::GetCurrentThreadIdentifier(&id)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../base/logging.h:706:35: note: expanded from macro 'DCHECK' LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \ ^ ../base/logging.h:670:3: note: expanded from macro 'DCHECK_IS_ON' ((::logging::g_dcheck_state == \ ^ ../base/logging.h:362:5: note: expanded from macro 'LAZY_STREAM' !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream) ^~~~~~~~~ /b/build/slave/cr-mac-rel/build/src/chrome/browser/extensions/test_extension_system.cc:57:56: note: uninitialized use occurs here socket_manager_.reset(new ApiResourceManager<Socket>(id)); ^~ /b/build/slave/cr-mac-rel/build/src/chrome/browser/extensions/test_extension_system.cc:56:3: note: remove the '&&' if its condition is always true DCHECK(BrowserThread::GetCurrentThreadIdentifier(&id)); ^ ../base/logging.h:706:35: note: expanded from macro 'DCHECK' LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \ ^ ../base/logging.h:670:3: note: expanded from macro 'DCHECK_IS_ON' ((::logging::g_dcheck_state == \ ^ ../base/logging.h:362:5: note: expanded from macro 'LAZY_STREAM' !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream) ^ /b/build/slave/cr-mac-rel/build/src/chrome/browser/extensions/test_extension_system.cc:55:3: note: variable 'id' is declared here BrowserThread::ID id; ^ 1 error generated. - Improve unit testing of socket API. Add socket_api_unittest.cc, which calls Socket API functions directly. This skips the whole browser_tests setup that is relatively slow and expensive. The current test merely validates the socket-type argument handling, but the next phase will simulate blocking socket operations. BUG=112902 TEST=see above Review URL: https://chromiumcodereview.appspot.com/10795052 TBR=miket@chromium.org Review URL: https://chromiumcodereview.appspot.com/10830061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/socket/socket_api.cc')
-rw-r--r--chrome/browser/extensions/api/socket/socket_api.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc
index b9bd48f..6ef6b4b 100644
--- a/chrome/browser/extensions/api/socket/socket_api.cc
+++ b/chrome/browser/extensions/api/socket/socket_api.cc
@@ -42,10 +42,6 @@ SocketAsyncApiFunction::~SocketAsyncApiFunction() {
bool SocketAsyncApiFunction::PrePrepare() {
manager_ = ExtensionSystem::Get(profile())->socket_manager();
- DCHECK(manager_) << "There is no socket manager. "
- "If this assertion is failing during a test, then it is likely that "
- "TestExtensionSystem is failing to provide an instance of "
- "ApiResourceManager<Socket>.";
return manager_ != NULL;
}