• thakis@chromium.org's avatar
    Revert 148856 (broke mac, asan, linux cros bots) · 13b94c9b
    thakis@chromium.org authored
    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
    13b94c9b
test_extension_system.h 3.13 KB