OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 return num; | 31 return num; |
32 } | 32 } |
33 | 33 |
34 } // namespace | 34 } // namespace |
35 | 35 |
36 class ProfileSyncServiceAndroidTest : public testing::Test { | 36 class ProfileSyncServiceAndroidTest : public testing::Test { |
37 public: | 37 public: |
38 ProfileSyncServiceAndroidTest() | 38 ProfileSyncServiceAndroidTest() |
39 : command_line_(base::CommandLine::NO_PROGRAM) {} | 39 : command_line_(base::CommandLine::NO_PROGRAM) {} |
40 virtual ~ProfileSyncServiceAndroidTest() {} | 40 ~ProfileSyncServiceAndroidTest() override {} |
41 | 41 |
42 virtual void SetUp() override { | 42 void SetUp() override { |
43 ProfileOAuth2TokenService* token_service = | 43 ProfileOAuth2TokenService* token_service = |
44 ProfileOAuth2TokenServiceFactory::GetForProfile(&profile_); | 44 ProfileOAuth2TokenServiceFactory::GetForProfile(&profile_); |
45 ProfileSyncComponentsFactory* factory = | 45 ProfileSyncComponentsFactory* factory = |
46 new ProfileSyncComponentsFactoryImpl( | 46 new ProfileSyncComponentsFactoryImpl( |
47 &profile_, | 47 &profile_, |
48 &command_line_, | 48 &command_line_, |
49 GURL(), | 49 GURL(), |
50 token_service, | 50 token_service, |
51 profile_.GetRequestContext()); | 51 profile_.GetRequestContext()); |
52 sync_service_.reset(new ProfileSyncService( | 52 sync_service_.reset(new ProfileSyncService( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 std::string notification_type; | 94 std::string notification_type; |
95 if (syncer::RealModelTypeToNotificationType(it.Get(), ¬ification_type)) | 95 if (syncer::RealModelTypeToNotificationType(it.Get(), ¬ification_type)) |
96 invalidation_names.push_back(notification_type); | 96 invalidation_names.push_back(notification_type); |
97 } | 97 } |
98 | 98 |
99 std::sort(invalidation_names.begin(), invalidation_names.end()); | 99 std::sort(invalidation_names.begin(), invalidation_names.end()); |
100 EXPECT_EQ(JoinString(invalidation_names, ", "), | 100 EXPECT_EQ(JoinString(invalidation_names, ", "), |
101 ProfileSyncServiceAndroid::ModelTypeSelectionToStringForTest( | 101 ProfileSyncServiceAndroid::ModelTypeSelectionToStringForTest( |
102 model_type_selection)); | 102 model_type_selection)); |
103 } | 103 } |
OLD | NEW |