| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/sync/test/integration/sync_test.h" | 5 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 void SyncTest::InitializeInvalidations(int index) { | 399 void SyncTest::InitializeInvalidations(int index) { |
| 400 if (server_type_ == IN_PROCESS_FAKE_SERVER) { | 400 if (server_type_ == IN_PROCESS_FAKE_SERVER) { |
| 401 CHECK(fake_server_.get()); | 401 CHECK(fake_server_.get()); |
| 402 fake_server::FakeServerInvalidationService* invalidation_service = | 402 fake_server::FakeServerInvalidationService* invalidation_service = |
| 403 static_cast<fake_server::FakeServerInvalidationService*>( | 403 static_cast<fake_server::FakeServerInvalidationService*>( |
| 404 InvalidationServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 404 InvalidationServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 405 GetProfile(index), | 405 GetProfile(index), |
| 406 fake_server::FakeServerInvalidationService::Build)); | 406 fake_server::FakeServerInvalidationService::Build)); |
| 407 fake_server_->AddObserver(invalidation_service); | 407 fake_server_->AddObserver(invalidation_service); |
| 408 invalidation_service->SetSelfNotificationsEnabled( |
| 409 TestUsesSelfNotifications()); |
| 408 fake_server_invalidation_services_[index] = invalidation_service; | 410 fake_server_invalidation_services_[index] = invalidation_service; |
| 409 } else { | 411 } else { |
| 410 invalidation::P2PInvalidationService* p2p_invalidation_service = | 412 invalidation::P2PInvalidationService* p2p_invalidation_service = |
| 411 static_cast<invalidation::P2PInvalidationService*>( | 413 static_cast<invalidation::P2PInvalidationService*>( |
| 412 InvalidationServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 414 InvalidationServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 413 GetProfile(index), | 415 GetProfile(index), |
| 414 TestUsesSelfNotifications() ? | 416 TestUsesSelfNotifications() ? |
| 415 BuildSelfNotifyingP2PInvalidationService | 417 BuildSelfNotifyingP2PInvalidationService |
| 416 : BuildRealisticP2PInvalidationService)); | 418 : BuildRealisticP2PInvalidationService)); |
| 417 p2p_invalidation_service->UpdateCredentials(username_, password_); | 419 p2p_invalidation_service->UpdateCredentials(username_, password_); |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 BrowserThread::PostTask( | 1046 BrowserThread::PostTask( |
| 1045 BrowserThread::IO, FROM_HERE, | 1047 BrowserThread::IO, FROM_HERE, |
| 1046 base::Bind(&SetProxyConfigCallback, &done, | 1048 base::Bind(&SetProxyConfigCallback, &done, |
| 1047 make_scoped_refptr(context_getter), proxy_config)); | 1049 make_scoped_refptr(context_getter), proxy_config)); |
| 1048 done.Wait(); | 1050 done.Wait(); |
| 1049 } | 1051 } |
| 1050 | 1052 |
| 1051 fake_server::FakeServer* SyncTest::GetFakeServer() const { | 1053 fake_server::FakeServer* SyncTest::GetFakeServer() const { |
| 1052 return fake_server_.get(); | 1054 return fake_server_.get(); |
| 1053 } | 1055 } |
| OLD | NEW |