| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 class SyncServerStatusChecker : public net::URLFetcherDelegate { | 109 class SyncServerStatusChecker : public net::URLFetcherDelegate { |
| 110 public: | 110 public: |
| 111 SyncServerStatusChecker() : running_(false) {} | 111 SyncServerStatusChecker() : running_(false) {} |
| 112 | 112 |
| 113 void OnURLFetchComplete(const net::URLFetcher* source) override { | 113 void OnURLFetchComplete(const net::URLFetcher* source) override { |
| 114 std::string data; | 114 std::string data; |
| 115 source->GetResponseAsString(&data); | 115 source->GetResponseAsString(&data); |
| 116 running_ = | 116 running_ = |
| 117 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS && | 117 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS && |
| 118 source->GetResponseCode() == 200 && data.find("ok") == 0); | 118 source->GetResponseCode() == 200 && data.find("ok") == 0); |
| 119 base::MessageLoop::current()->Quit(); | 119 base::MessageLoop::current()->QuitWhenIdle(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 bool running() const { return running_; } | 122 bool running() const { return running_; } |
| 123 | 123 |
| 124 private: | 124 private: |
| 125 bool running_; | 125 bool running_; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 bool IsEncryptionComplete(const ProfileSyncService* service) { | 128 bool IsEncryptionComplete(const ProfileSyncService* service) { |
| 129 return service->IsEncryptEverythingEnabled() && | 129 return service->IsEncryptEverythingEnabled() && |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 content::NotificationService::current()->Notify( | 1112 content::NotificationService::current()->Notify( |
| 1113 chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, | 1113 chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, |
| 1114 content::Source<Profile>(GetProfile(index)), | 1114 content::Source<Profile>(GetProfile(index)), |
| 1115 content::Details<const syncer::ModelTypeSet>(&model_types)); | 1115 content::Details<const syncer::ModelTypeSet>(&model_types)); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 void SyncTest::SetPreexistingPreferencesFileContents( | 1118 void SyncTest::SetPreexistingPreferencesFileContents( |
| 1119 const std::string& contents) { | 1119 const std::string& contents) { |
| 1120 preexisting_preferences_file_contents_ = contents; | 1120 preexisting_preferences_file_contents_ = contents; |
| 1121 } | 1121 } |
| OLD | NEW |