| 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");
|
|
|