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

Unified Diff: chrome/browser/sync/glue/http_bridge.cc

Issue 6764024: [Sync] Fix ConfigureDataTypes bug that leads to extra nudge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/http_bridge.cc
diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc
index 15aa53032c1e4ec778fffaefe2ee561b58e46bb2..cca9c9628077f50c3b8424cd7ceb60210c43bb23 100644
--- a/chrome/browser/sync/glue/http_bridge.cc
+++ b/chrome/browser/sync/glue/http_bridge.cc
@@ -174,9 +174,13 @@ bool HttpBridge::MakeSynchronousPost(int* os_error_code, int* response_code) {
DCHECK(url_for_request_.is_valid()) << "Invalid URL for request";
DCHECK(!content_type_.empty()) << "Payload not set";
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(this, &HttpBridge::CallMakeAsynchronousPost));
+ if (!BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ NewRunnableMethod(this, &HttpBridge::CallMakeAsynchronousPost))) {
+ // This usually happens when we're in a unit test.
+ LOG(WARNING) << "Could not post CallMakeAsynchronousPost task";
+ return false;
+ }
if (!http_post_completed_.Wait()) // Block until network request completes.
NOTREACHED(); // See OnURLFetchComplete.
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.h » ('j') | chrome/browser/sync/glue/sync_backend_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698