Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/browser/sync/internal_api/syncapi_server_connection_manager_unittest.cc

Issue 7846007: net: Rename URLRequestStatus::os_error_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix os_error_code Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/internal_api/syncapi_server_connection_manager.h" 5 #include "chrome/browser/sync/internal_api/syncapi_server_connection_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 BlockingHttpPost() : wait_for_abort_(false, false) {} 29 BlockingHttpPost() : wait_for_abort_(false, false) {}
30 virtual ~BlockingHttpPost() {} 30 virtual ~BlockingHttpPost() {}
31 31
32 virtual void SetUserAgent(const char* user_agent) OVERRIDE {} 32 virtual void SetUserAgent(const char* user_agent) OVERRIDE {}
33 virtual void SetExtraRequestHeaders(const char* headers) OVERRIDE {} 33 virtual void SetExtraRequestHeaders(const char* headers) OVERRIDE {}
34 virtual void SetURL(const char* url, int port) OVERRIDE {} 34 virtual void SetURL(const char* url, int port) OVERRIDE {}
35 virtual void SetPostPayload(const char* content_type, 35 virtual void SetPostPayload(const char* content_type,
36 int content_length, 36 int content_length,
37 const char* content) OVERRIDE {} 37 const char* content) OVERRIDE {}
38 virtual bool MakeSynchronousPost(int* os_error_code, int* response_code) 38 virtual bool MakeSynchronousPost(int* error_code, int* response_code)
39 OVERRIDE { 39 OVERRIDE {
40 wait_for_abort_.TimedWait(TimeDelta::FromMilliseconds( 40 wait_for_abort_.TimedWait(TimeDelta::FromMilliseconds(
41 TestTimeouts::action_max_timeout_ms())); 41 TestTimeouts::action_max_timeout_ms()));
42 *os_error_code = net::ERR_ABORTED; 42 *error_code = net::ERR_ABORTED;
43 return false; 43 return false;
44 } 44 }
45 virtual int GetResponseContentLength() const OVERRIDE { 45 virtual int GetResponseContentLength() const OVERRIDE {
46 return 0; 46 return 0;
47 } 47 }
48 virtual const char* GetResponseContent() const OVERRIDE { 48 virtual const char* GetResponseContent() const OVERRIDE {
49 return ""; 49 return "";
50 } 50 }
51 virtual const std::string GetResponseHeaderValue( 51 virtual const std::string GetResponseHeaderValue(
52 const std::string& name) const OVERRIDE { 52 const std::string& name) const OVERRIDE {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::Unretained(&server)), 133 base::Unretained(&server)),
134 TestTimeouts::tiny_timeout_ms()); 134 TestTimeouts::tiny_timeout_ms());
135 135
136 int32 time = 0; 136 int32 time = 0;
137 bool result = server.CheckTime(&time); 137 bool result = server.CheckTime(&time);
138 EXPECT_FALSE(result); 138 EXPECT_FALSE(result);
139 abort_thread.Stop(); 139 abort_thread.Stop();
140 } 140 }
141 141
142 } // namespace sync_api 142 } // namespace sync_api
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698