| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/ntp_snippets/remote/scheduling_remote_suggestions_provider.
h" | 5 #include "components/ntp_snippets/remote/scheduling_remote_suggestions_provider.
h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 18 #include "base/test/simple_test_clock.h" |
| 18 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "base/time/clock.h" |
| 19 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 20 #include "components/ntp_snippets/features.h" | 22 #include "components/ntp_snippets/features.h" |
| 21 #include "components/ntp_snippets/ntp_snippets_constants.h" | 23 #include "components/ntp_snippets/ntp_snippets_constants.h" |
| 22 #include "components/ntp_snippets/pref_names.h" | 24 #include "components/ntp_snippets/pref_names.h" |
| 23 #include "components/ntp_snippets/remote/persistent_scheduler.h" | 25 #include "components/ntp_snippets/remote/persistent_scheduler.h" |
| 24 #include "components/ntp_snippets/remote/remote_suggestions_provider.h" | 26 #include "components/ntp_snippets/remote/remote_suggestions_provider.h" |
| 25 #include "components/ntp_snippets/remote/test_utils.h" | 27 #include "components/ntp_snippets/remote/test_utils.h" |
| 26 #include "components/ntp_snippets/status.h" | 28 #include "components/ntp_snippets/status.h" |
| 27 #include "components/ntp_snippets/user_classifier.h" | 29 #include "components/ntp_snippets/user_classifier.h" |
| 28 #include "components/prefs/testing_pref_service.h" | 30 #include "components/prefs/testing_pref_service.h" |
| 29 #include "components/variations/variations_params_manager.h" | 31 #include "components/variations/variations_params_manager.h" |
| 30 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
| 31 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 32 | 34 |
| 33 using testing::ElementsAre; | 35 using testing::ElementsAre; |
| 34 using testing::Eq; | 36 using testing::Eq; |
| 35 using testing::InSequence; | 37 using testing::InSequence; |
| 36 using testing::Invoke; | 38 using testing::Invoke; |
| 37 using testing::IsEmpty; | 39 using testing::IsEmpty; |
| 38 using testing::Mock; | 40 using testing::Mock; |
| 39 using testing::MockFunction; | 41 using testing::MockFunction; |
| 40 using testing::Not; | 42 using testing::Not; |
| 43 using testing::Return; |
| 41 using testing::SaveArg; | 44 using testing::SaveArg; |
| 42 using testing::SaveArgPointee; | 45 using testing::SaveArgPointee; |
| 43 using testing::SizeIs; | 46 using testing::SizeIs; |
| 44 using testing::StartsWith; | 47 using testing::StartsWith; |
| 45 using testing::StrictMock; | 48 using testing::StrictMock; |
| 46 using testing::WithArgs; | 49 using testing::WithArgs; |
| 47 using testing::_; | 50 using testing::_; |
| 48 | 51 |
| 49 namespace ntp_snippets { | 52 namespace ntp_snippets { |
| 50 | 53 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 auto underlying_provider = | 129 auto underlying_provider = |
| 127 base::MakeUnique<StrictMock<MockRemoteSuggestionsProvider>>( | 130 base::MakeUnique<StrictMock<MockRemoteSuggestionsProvider>>( |
| 128 /*observer=*/nullptr); | 131 /*observer=*/nullptr); |
| 129 underlying_provider_ = underlying_provider.get(); | 132 underlying_provider_ = underlying_provider.get(); |
| 130 | 133 |
| 131 // SchedulingRemoteSuggestionsProvider calls SetProviderStatusCallback(_) to | 134 // SchedulingRemoteSuggestionsProvider calls SetProviderStatusCallback(_) to |
| 132 // stay in the loop of status changes. | 135 // stay in the loop of status changes. |
| 133 EXPECT_CALL(*underlying_provider_, SetProviderStatusCallback(_)) | 136 EXPECT_CALL(*underlying_provider_, SetProviderStatusCallback(_)) |
| 134 .WillOnce(SaveArg<0>(&provider_status_callback_)); | 137 .WillOnce(SaveArg<0>(&provider_status_callback_)); |
| 135 | 138 |
| 139 auto test_clock = base::MakeUnique<base::SimpleTestClock>(); |
| 140 test_clock_ = test_clock.get(); |
| 141 test_clock_->SetNow(base::Time::Now()); |
| 142 |
| 136 scheduling_provider_ = | 143 scheduling_provider_ = |
| 137 base::MakeUnique<SchedulingRemoteSuggestionsProvider>( | 144 base::MakeUnique<SchedulingRemoteSuggestionsProvider>( |
| 138 /*observer=*/nullptr, std::move(underlying_provider), | 145 /*observer=*/nullptr, std::move(underlying_provider), |
| 139 &persistent_scheduler_, &user_classifier_, utils_.pref_service()); | 146 &persistent_scheduler_, &user_classifier_, utils_.pref_service(), |
| 147 std::move(test_clock)); |
| 140 } | 148 } |
| 141 | 149 |
| 142 protected: | 150 protected: |
| 143 StrictMock<MockPersistentScheduler> persistent_scheduler_; | 151 StrictMock<MockPersistentScheduler> persistent_scheduler_; |
| 144 StrictMock<MockRemoteSuggestionsProvider>* underlying_provider_; | 152 StrictMock<MockRemoteSuggestionsProvider>* underlying_provider_; |
| 145 std::unique_ptr<SchedulingRemoteSuggestionsProvider> scheduling_provider_; | 153 std::unique_ptr<SchedulingRemoteSuggestionsProvider> scheduling_provider_; |
| 146 RemoteSuggestionsProvider::ProviderStatusCallback provider_status_callback_; | 154 RemoteSuggestionsProvider::ProviderStatusCallback provider_status_callback_; |
| 155 base::SimpleTestClock* test_clock_; |
| 147 | 156 |
| 148 void ChangeStatusOfUnderlyingProvider( | 157 void ChangeStatusOfUnderlyingProvider( |
| 149 RemoteSuggestionsProvider::ProviderStatus new_status) { | 158 RemoteSuggestionsProvider::ProviderStatus new_status) { |
| 150 provider_status_callback_.Run(new_status); | 159 provider_status_callback_.Run(new_status); |
| 151 } | 160 } |
| 152 | 161 |
| 153 private: | 162 private: |
| 154 test::RemoteSuggestionsTestUtils utils_; | 163 test::RemoteSuggestionsTestUtils utils_; |
| 155 UserClassifier user_classifier_; | 164 UserClassifier user_classifier_; |
| 156 | 165 |
| 157 DISALLOW_COPY_AND_ASSIGN(SchedulingRemoteSuggestionsProviderTest); | 166 DISALLOW_COPY_AND_ASSIGN(SchedulingRemoteSuggestionsProviderTest); |
| 158 }; | 167 }; |
| 159 | 168 |
| 160 TEST_F(SchedulingRemoteSuggestionsProviderTest, | 169 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 170 ShouldIgnoreSignalsWhenNotEnabled) { |
| 171 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 172 scheduling_provider_->OnNTPOpened(); |
| 173 } |
| 174 |
| 175 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 161 ShouldFetchOnPersistentSchedulerWakeUp) { | 176 ShouldFetchOnPersistentSchedulerWakeUp) { |
| 177 // First enable the scheduler. |
| 178 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 179 ChangeStatusOfUnderlyingProvider( |
| 180 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 181 |
| 162 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)); | 182 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)); |
| 163 scheduling_provider_->OnPersistentSchedulerWakeUp(); | 183 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 164 } | 184 } |
| 165 | 185 |
| 166 TEST_F(SchedulingRemoteSuggestionsProviderTest, | 186 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 187 ShouldFetchOnPersistentSchedulerWakeUpRepeated) { |
| 188 RemoteSuggestionsProvider::FetchStatusCallback signal_fetch_done; |
| 189 { |
| 190 InSequence s; |
| 191 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 192 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)) |
| 193 .WillOnce(SaveArg<0>(&signal_fetch_done)); |
| 194 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 195 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)); |
| 196 } |
| 197 // First enable the scheduler -- calling Schedule() for the first time. |
| 198 ChangeStatusOfUnderlyingProvider( |
| 199 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 200 // Make the first persistent fetch successful -- calling Schedule() again. |
| 201 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 202 signal_fetch_done.Run(Status::Success()); |
| 203 // Make the second fetch. |
| 204 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 205 } |
| 206 |
| 207 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 208 ShouldNotTriggerBackgroundFetchIfAlreadyInProgess) { |
| 209 { |
| 210 InSequence s; |
| 211 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 212 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)); |
| 213 // RefetchInTheBackground is not called after the second trigger. |
| 214 } |
| 215 // First enable the scheduler -- calling Schedule() for the first time. |
| 216 ChangeStatusOfUnderlyingProvider( |
| 217 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 218 // Make the first persistent fetch never finish. |
| 219 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 220 // Make the second fetch. |
| 221 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 222 } |
| 223 |
| 224 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 225 ShouldFetchOnNTPOpenedForTheFirstTime) { |
| 226 // First enable the scheduler. |
| 227 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 228 ChangeStatusOfUnderlyingProvider( |
| 229 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 230 |
| 231 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)); |
| 232 scheduling_provider_->OnNTPOpened(); |
| 233 } |
| 234 |
| 235 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 236 ShouldNotFetchOnNTPOpenedAfterSuccessfulSoftFetch) { |
| 237 // First enable the scheduler; the second Schedule is called after the |
| 238 // successful fetch. |
| 239 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); |
| 240 ChangeStatusOfUnderlyingProvider( |
| 241 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 242 |
| 243 // Make the first soft fetch successful. |
| 244 RemoteSuggestionsProvider::FetchStatusCallback signal_fetch_done; |
| 245 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)) |
| 246 .WillOnce(SaveArg<0>(&signal_fetch_done)); |
| 247 scheduling_provider_->OnNTPOpened(); |
| 248 signal_fetch_done.Run(Status::Success()); |
| 249 // The second call is ignored if it happens right after the first one. |
| 250 scheduling_provider_->OnNTPOpened(); |
| 251 } |
| 252 |
| 253 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 254 ShouldNotFetchOnNTPOpenedAfterSuccessfulPersistentFetch) { |
| 255 // First enable the scheduler; the second Schedule is called after the |
| 256 // successful fetch. |
| 257 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); |
| 258 ChangeStatusOfUnderlyingProvider( |
| 259 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 260 |
| 261 // Make the first persistent fetch successful. |
| 262 RemoteSuggestionsProvider::FetchStatusCallback signal_fetch_done; |
| 263 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)) |
| 264 .WillOnce(SaveArg<0>(&signal_fetch_done)); |
| 265 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 266 signal_fetch_done.Run(Status::Success()); |
| 267 // The second call is ignored if it happens right after the first one. |
| 268 scheduling_provider_->OnNTPOpened(); |
| 269 } |
| 270 |
| 271 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 272 ShouldNotFetchOnNTPOpenedAfterFailedSoftFetch) { |
| 273 // First enable the scheduler. |
| 274 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 275 ChangeStatusOfUnderlyingProvider( |
| 276 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 277 |
| 278 // Make the first soft fetch failed. |
| 279 RemoteSuggestionsProvider::FetchStatusCallback signal_fetch_done; |
| 280 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)) |
| 281 .WillOnce(SaveArg<0>(&signal_fetch_done)); |
| 282 scheduling_provider_->OnNTPOpened(); |
| 283 signal_fetch_done.Run(Status(StatusCode::PERMANENT_ERROR, "")); |
| 284 |
| 285 // The second call is ignored if it happens right after the first one. |
| 286 scheduling_provider_->OnNTPOpened(); |
| 287 } |
| 288 |
| 289 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 290 ShouldNotFetchOnNTPOpenedAfterFailedPersistentFetch) { |
| 291 // First enable the scheduler. |
| 292 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 293 ChangeStatusOfUnderlyingProvider( |
| 294 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 295 |
| 296 // Make the first persistent fetch failed. |
| 297 RemoteSuggestionsProvider::FetchStatusCallback signal_fetch_done; |
| 298 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)) |
| 299 .WillOnce(SaveArg<0>(&signal_fetch_done)); |
| 300 scheduling_provider_->OnPersistentSchedulerWakeUp(); |
| 301 signal_fetch_done.Run(Status(StatusCode::PERMANENT_ERROR, "")); |
| 302 |
| 303 // The second call is ignored if it happens right after the first one. |
| 304 scheduling_provider_->OnNTPOpened(); |
| 305 } |
| 306 |
| 307 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 308 ShouldFetchAgainOnNTPOpenedLaterAgain) { |
| 309 RemoteSuggestionsProvider::FetchStatusCallback signal_fetch_done; |
| 310 { |
| 311 InSequence s; |
| 312 // Initial scheduling after being enabled. |
| 313 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 314 // The first call to NTPOpened results in a fetch. |
| 315 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)) |
| 316 .WillOnce(SaveArg<0>(&signal_fetch_done)); |
| 317 // Rescheduling after a succesful fetch. |
| 318 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 319 // The second call to NTPOpened 2hrs later again results in a fetch. |
| 320 EXPECT_CALL(*underlying_provider_, RefetchInTheBackground(_)); |
| 321 } |
| 322 |
| 323 // First enable the scheduler. |
| 324 ChangeStatusOfUnderlyingProvider( |
| 325 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 326 // Make the first soft fetch successful. |
| 327 scheduling_provider_->OnNTPOpened(); |
| 328 signal_fetch_done.Run(Status::Success()); |
| 329 // Open NTP again after 2hrs. |
| 330 test_clock_->Advance(base::TimeDelta::FromHours(2)); |
| 331 scheduling_provider_->OnNTPOpened(); |
| 332 } |
| 333 |
| 334 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 167 ShouldRescheduleOnRescheduleFetching) { | 335 ShouldRescheduleOnRescheduleFetching) { |
| 168 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); | 336 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 169 scheduling_provider_->RescheduleFetching(); | 337 scheduling_provider_->RescheduleFetching(); |
| 170 } | 338 } |
| 171 | 339 |
| 172 TEST_F(SchedulingRemoteSuggestionsProviderTest, ShouldScheduleOnActivation) { | 340 TEST_F(SchedulingRemoteSuggestionsProviderTest, ShouldScheduleOnActivation) { |
| 173 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); | 341 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)); |
| 174 ChangeStatusOfUnderlyingProvider( | 342 ChangeStatusOfUnderlyingProvider( |
| 175 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); | 343 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 176 } | 344 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 TEST_F(SchedulingRemoteSuggestionsProviderTest, | 428 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 261 ReschedulesWhenWifiParamChanges) { | 429 ReschedulesWhenWifiParamChanges) { |
| 262 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); | 430 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); |
| 263 ChangeStatusOfUnderlyingProvider( | 431 ChangeStatusOfUnderlyingProvider( |
| 264 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); | 432 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 265 | 433 |
| 266 // UserClassifier defaults to UserClass::ACTIVE_NTP_USER if PrefService is | 434 // UserClassifier defaults to UserClass::ACTIVE_NTP_USER if PrefService is |
| 267 // null. Change the wifi interval for this class. | 435 // null. Change the wifi interval for this class. |
| 268 variations::testing::VariationParamsManager params_manager( | 436 variations::testing::VariationParamsManager params_manager( |
| 269 ntp_snippets::kStudyName, | 437 ntp_snippets::kStudyName, |
| 270 {{"fetching_interval_hours-wifi-active_ntp_user", "2"}}, | 438 {{"fetching_interval_hours-wifi-active_ntp_user", "1.5"}}, |
| 271 {kArticleSuggestionsFeature.name}); | 439 {kArticleSuggestionsFeature.name}); |
| 272 | 440 |
| 273 // Schedule() should get called for the second time after params have changed. | 441 // Schedule() should get called for the second time after params have changed. |
| 274 ChangeStatusOfUnderlyingProvider( | 442 ChangeStatusOfUnderlyingProvider( |
| 275 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); | 443 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 276 } | 444 } |
| 277 | 445 |
| 278 TEST_F(SchedulingRemoteSuggestionsProviderTest, | 446 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 279 ReschedulesWhenFallbackParamChanges) { | 447 ReschedulesWhenFallbackParamChanges) { |
| 280 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); | 448 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); |
| 281 ChangeStatusOfUnderlyingProvider( | 449 ChangeStatusOfUnderlyingProvider( |
| 282 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); | 450 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 283 | 451 |
| 284 // UserClassifier defaults to UserClass::ACTIVE_NTP_USER if PrefService is | 452 // UserClassifier defaults to UserClass::ACTIVE_NTP_USER if PrefService is |
| 285 // null. Change the wifi interval for this class. | 453 // null. Change the wifi interval for this class. |
| 286 variations::testing::VariationParamsManager params_manager( | 454 variations::testing::VariationParamsManager params_manager( |
| 287 ntp_snippets::kStudyName, | 455 ntp_snippets::kStudyName, |
| 288 {{"fetching_interval_hours-fallback-active_ntp_user", "2"}}, | 456 {{"fetching_interval_hours-fallback-active_ntp_user", "1.5"}}, |
| 289 {kArticleSuggestionsFeature.name}); | 457 {kArticleSuggestionsFeature.name}); |
| 290 | 458 |
| 291 // Schedule() should get called for the second time after params have changed. | 459 // Schedule() should get called for the second time after params have changed. |
| 460 ChangeStatusOfUnderlyingProvider( |
| 461 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 462 } |
| 463 |
| 464 TEST_F(SchedulingRemoteSuggestionsProviderTest, |
| 465 ReschedulesWhenOnUsageEventParamChanges) { |
| 466 EXPECT_CALL(persistent_scheduler_, Schedule(_, _)).Times(2); |
| 467 ChangeStatusOfUnderlyingProvider( |
| 468 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 469 |
| 470 // UserClassifier defaults to UserClass::ACTIVE_NTP_USER if PrefService is |
| 471 // null. Change the wifi interval for this class. |
| 472 variations::testing::VariationParamsManager params_manager( |
| 473 ntp_snippets::kStudyName, |
| 474 {{"soft_fetching_interval_hours-active-active_ntp_user", "1.5"}}, |
| 475 {kArticleSuggestionsFeature.name}); |
| 476 |
| 477 // Schedule() should get called for the second time after params have changed. |
| 292 ChangeStatusOfUnderlyingProvider( | 478 ChangeStatusOfUnderlyingProvider( |
| 293 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); | 479 RemoteSuggestionsProvider::ProviderStatus::ACTIVE); |
| 294 } | 480 } |
| 295 | 481 |
| 296 } // namespace ntp_snippets | 482 } // namespace ntp_snippets |
| OLD | NEW |