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

Unified Diff: components/sync/core/http_bridge.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « components/sync/core/http_bridge.h ('k') | components/sync/core/http_bridge_network_resources.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/http_bridge.cc
diff --git a/sync/internal_api/http_bridge.cc b/components/sync/core/http_bridge.cc
similarity index 95%
rename from sync/internal_api/http_bridge.cc
rename to components/sync/core/http_bridge.cc
index 87884c55373f015673415d68cbe0c7587bbecbfa..2434e5083dbbac1f14f86224ae9a2b80d54f3b11 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/components/sync/core/http_bridge.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/internal_api/public/http_bridge.h"
+#include "components/sync/core/http_bridge.h"
#include <stddef.h>
#include <stdint.h>
@@ -17,6 +17,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "components/sync/base/cancelation_signal.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_cache.h"
@@ -28,7 +29,6 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "net/url_request/url_request_status.h"
-#include "sync/internal_api/public/base/cancelation_signal.h"
namespace syncer {
@@ -121,8 +121,7 @@ HttpBridge::URLFetchState::URLFetchState()
request_completed(false),
request_succeeded(false),
http_response_code(-1),
- error_code(-1) {
-}
+ error_code(-1) {}
HttpBridge::URLFetchState::~URLFetchState() {}
HttpBridge::HttpBridge(
@@ -138,10 +137,9 @@ HttpBridge::HttpBridge(
network_time_update_callback_(network_time_update_callback),
bind_to_tracker_callback_(bind_to_tracker_callback) {}
-HttpBridge::~HttpBridge() {
-}
+HttpBridge::~HttpBridge() {}
-void HttpBridge::SetExtraRequestHeaders(const char * headers) {
+void HttpBridge::SetExtraRequestHeaders(const char* headers) {
DCHECK(extra_headers_.empty())
<< "HttpBridge::SetExtraRequestHeaders called twice.";
extra_headers_.assign(headers);
@@ -199,8 +197,7 @@ bool HttpBridge::MakeSynchronousPost(int* error_code, int* response_code) {
#endif
if (!network_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&HttpBridge::CallMakeAsynchronousPost, this))) {
+ FROM_HERE, base::Bind(&HttpBridge::CallMakeAsynchronousPost, this))) {
// This usually happens when we're in a unit test.
LOG(WARNING) << "Could not post CallMakeAsynchronousPost task";
return false;
@@ -249,10 +246,9 @@ void HttpBridge::MakeAsynchronousPost() {
fetch_state_.url_poster->AddExtraRequestHeader(base::StringPrintf(
"%s: %s", net::HttpRequestHeaders::kUserAgent, user_agent_.c_str()));
- fetch_state_.url_poster->SetLoadFlags(net::LOAD_BYPASS_CACHE |
- net::LOAD_DISABLE_CACHE |
- net::LOAD_DO_NOT_SAVE_COOKIES |
- net::LOAD_DO_NOT_SEND_COOKIES);
+ fetch_state_.url_poster->SetLoadFlags(
+ net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
+ net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES);
fetch_state_.url_poster->Start();
}
@@ -308,9 +304,8 @@ void HttpBridge::Abort() {
http_post_completed_.Signal();
}
-void HttpBridge::DestroyURLFetcherOnIOThread(
- net::URLFetcher* fetcher,
- base::Timer* fetch_timer) {
+void HttpBridge::DestroyURLFetcherOnIOThread(net::URLFetcher* fetcher,
+ base::Timer* fetch_timer) {
DCHECK(network_task_runner_->BelongsToCurrentThread());
if (fetch_timer)
delete fetch_timer;
« no previous file with comments | « components/sync/core/http_bridge.h ('k') | components/sync/core/http_bridge_network_resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698