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

Side by Side Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 1330443002: Report data usage UMA for Chrome services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewArchServices
Patch Set: Fix calling Init function in sync_client.cc Created 5 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // Unit tests for the SyncApi. Note that a lot of the underlying 5 // Unit tests for the SyncApi. Note that a lot of the underlying
6 // functionality is provided by the Syncable layer, which has its own 6 // functionality is provided by the Syncable layer, which has its own
7 // unit tests. We'll test SyncApi specific things in this harness. 7 // unit tests. We'll test SyncApi specific things in this harness.
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 const std::string GetResponseHeaderValue( 794 const std::string GetResponseHeaderValue(
795 const std::string& name) const override { 795 const std::string& name) const override {
796 return std::string(); 796 return std::string();
797 } 797 }
798 void Abort() override {} 798 void Abort() override {}
799 }; 799 };
800 800
801 class TestHttpPostProviderFactory : public HttpPostProviderFactory { 801 class TestHttpPostProviderFactory : public HttpPostProviderFactory {
802 public: 802 public:
803 ~TestHttpPostProviderFactory() override {} 803 ~TestHttpPostProviderFactory() override {}
804 void Init(const std::string& user_agent) override {} 804 void Init(const std::string& user_agent,
805 const BindToTrackerCallback& bind_to_tracker_callback) override {}
805 HttpPostProviderInterface* Create() override { 806 HttpPostProviderInterface* Create() override {
806 return new TestHttpPostProviderInterface(); 807 return new TestHttpPostProviderInterface();
807 } 808 }
808 void Destroy(HttpPostProviderInterface* http) override { 809 void Destroy(HttpPostProviderInterface* http) override {
809 delete static_cast<TestHttpPostProviderInterface*>(http); 810 delete static_cast<TestHttpPostProviderInterface*>(http);
810 } 811 }
811 }; 812 };
812 813
813 class SyncManagerObserverMock : public SyncManager::Observer { 814 class SyncManagerObserverMock : public SyncManager::Observer {
814 public: 815 public:
(...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 // SyncManagerInitInvalidStorageTest::GetFactory will return 3356 // SyncManagerInitInvalidStorageTest::GetFactory will return
3356 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. 3357 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails.
3357 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's 3358 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's
3358 // task is to ensure that SyncManagerImpl reported initialization failure in 3359 // task is to ensure that SyncManagerImpl reported initialization failure in
3359 // OnInitializationComplete callback. 3360 // OnInitializationComplete callback.
3360 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { 3361 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) {
3361 EXPECT_FALSE(initialization_succeeded_); 3362 EXPECT_FALSE(initialization_succeeded_);
3362 } 3363 }
3363 3364
3364 } // namespace syncer 3365 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/http_post_provider_factory.h ('k') | sync/internal_api/syncapi_server_connection_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698