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

Unified Diff: components/sync/core_impl/attachments/attachment_uploader_impl_unittest.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
Index: components/sync/core_impl/attachments/attachment_uploader_impl_unittest.cc
diff --git a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc b/components/sync/core_impl/attachments/attachment_uploader_impl_unittest.cc
similarity index 97%
rename from sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
rename to components/sync/core_impl/attachments/attachment_uploader_impl_unittest.cc
index 44150e672dc8106884eba604640db9cbe82ace88..f269d6924fd5adcb78d52272d4abc1c496bc5527 100644
--- a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
+++ b/components/sync/core_impl/attachments/attachment_uploader_impl_unittest.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/attachments/attachment_uploader_impl.h"
+#include "components/sync/core/attachments/attachment_uploader_impl.h"
#include <string>
#include <utility>
@@ -23,6 +23,10 @@
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "components/sync/api/attachments/attachment.h"
+#include "components/sync/base/model_type.h"
+#include "components/sync/core/attachments/attachment_util.h"
+#include "components/sync/protocol/sync.pb.h"
#include "google_apis/gaia/fake_oauth2_token_service.h"
#include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/oauth2_token_service_request.h"
@@ -31,10 +35,6 @@
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "net/url_request/url_request_test_util.h"
-#include "sync/api/attachments/attachment.h"
-#include "sync/internal_api/public/attachments/attachment_util.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/protocol/sync.pb.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -112,11 +112,9 @@ MockOAuth2TokenService::MockOAuth2TokenService()
: response_error_(GoogleServiceAuthError::AuthErrorNone()),
response_access_token_(kAccessToken),
response_expiration_(base::Time::Max()),
- num_invalidate_token_(0) {
-}
+ num_invalidate_token_(0) {}
-MockOAuth2TokenService::~MockOAuth2TokenService() {
-}
+MockOAuth2TokenService::~MockOAuth2TokenService() {}
void MockOAuth2TokenService::SetResponse(const GoogleServiceAuthError& error,
const std::string& access_token,
@@ -172,8 +170,7 @@ TokenServiceProvider::TokenServiceProvider(OAuth2TokenService* token_service)
DCHECK(token_service_);
}
-TokenServiceProvider::~TokenServiceProvider() {
-}
+TokenServiceProvider::~TokenServiceProvider() {}
scoped_refptr<base::SingleThreadTaskRunner>
TokenServiceProvider::GetTokenServiceTaskRunner() {
@@ -269,8 +266,7 @@ class RequestHandler : public base::NonThreadSafe {
};
AttachmentUploaderImplTest::AttachmentUploaderImplTest()
- : weak_ptr_factory_(this) {
-}
+ : weak_ptr_factory_(this) {}
void AttachmentUploaderImplTest::OnRequestReceived(const HttpRequest& request) {
DCHECK(CalledOnValidThread());
@@ -347,8 +343,7 @@ AttachmentUploaderImplTest::upload_results() {
return upload_results_;
}
-std::vector<AttachmentId>&
-AttachmentUploaderImplTest::attachment_ids() {
+std::vector<AttachmentId>& AttachmentUploaderImplTest::attachment_ids() {
return attachment_ids_;
}
@@ -391,9 +386,8 @@ std::unique_ptr<HttpResponse> RequestHandler::HandleRequest(
const HttpRequest& request) {
DCHECK(CalledOnValidThread());
test_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(
- &AttachmentUploaderImplTest::OnRequestReceived, test_, request));
+ FROM_HERE, base::Bind(&AttachmentUploaderImplTest::OnRequestReceived,
+ test_, request));
std::unique_ptr<BasicHttpResponse> response(new BasicHttpResponse);
response->set_code(GetStatusCode());
response->set_content_type("text/plain");

Powered by Google App Engine
This is Rietveld 408576698