| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 // Tells us what kind of server we're using (some tests run only on certain | 267 // Tells us what kind of server we're using (some tests run only on certain |
| 268 // server types). | 268 // server types). |
| 269 ServerType server_type_; | 269 ServerType server_type_; |
| 270 | 270 |
| 271 // Number of sync clients that will be created by a test. | 271 // Number of sync clients that will be created by a test. |
| 272 int num_clients_; | 272 int num_clients_; |
| 273 | 273 |
| 274 // Collection of sync profiles used by a test. A sync profile maintains sync | 274 // Collection of sync profiles used by a test. A sync profile maintains sync |
| 275 // data contained within its own subdirectory under the chrome user data | 275 // data contained within its own subdirectory under the chrome user data |
| 276 // directory. | 276 // directory. Profiles are owned by the ProfileManager. |
| 277 ScopedVector<Profile> profiles_; | 277 std::vector<Profile*> profiles_; |
| 278 | 278 |
| 279 // Collection of pointers to the browser objects used by a test. One browser | 279 // Collection of pointers to the browser objects used by a test. One browser |
| 280 // instance is created for each sync profile. Browser object lifetime is | 280 // instance is created for each sync profile. Browser object lifetime is |
| 281 // managed by BrowserList, so we don't use a ScopedVector here. | 281 // managed by BrowserList, so we don't use a ScopedVector here. |
| 282 std::vector<Browser*> browsers_; | 282 std::vector<Browser*> browsers_; |
| 283 | 283 |
| 284 // Collection of sync clients used by a test. A sync client is associated with | 284 // Collection of sync clients used by a test. A sync client is associated with |
| 285 // a sync profile, and implements methods that sync the contents of the | 285 // a sync profile, and implements methods that sync the contents of the |
| 286 // profile with the server. | 286 // profile with the server. |
| 287 ScopedVector<ProfileSyncServiceHarness> clients_; | 287 ScopedVector<ProfileSyncServiceHarness> clients_; |
| 288 | 288 |
| 289 // Sync profile against which changes to individual profiles are verified. We | 289 // Sync profile against which changes to individual profiles are verified. We |
| 290 // don't need a corresponding verifier sync client because the contents of the | 290 // don't need a corresponding verifier sync client because the contents of the |
| 291 // verifier profile are strictly local, and are not meant to be synced. | 291 // verifier profile are strictly local, and are not meant to be synced. |
| 292 scoped_ptr<Profile> verifier_; | 292 Profile* verifier_; |
| 293 | 293 |
| 294 // Indicates whether changes to a profile should also change the verifier | 294 // Indicates whether changes to a profile should also change the verifier |
| 295 // profile or not. | 295 // profile or not. |
| 296 bool use_verifier_; | 296 bool use_verifier_; |
| 297 | 297 |
| 298 // Sync integration tests need to make live DNS requests for access to | 298 // Sync integration tests need to make live DNS requests for access to |
| 299 // GAIA and sync server URLs under google.com. We use a scoped version | 299 // GAIA and sync server URLs under google.com. We use a scoped version |
| 300 // to override the default resolver while the test is active. | 300 // to override the default resolver while the test is active. |
| 301 scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_; | 301 scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_; |
| 302 | 302 |
| 303 // Used to start and stop the local test server. | 303 // Used to start and stop the local test server. |
| 304 base::ProcessHandle test_server_handle_; | 304 base::ProcessHandle test_server_handle_; |
| 305 | 305 |
| 306 // Fake URLFetcher factory used to mock out GAIA signin. | 306 // Fake URLFetcher factory used to mock out GAIA signin. |
| 307 scoped_ptr<FakeURLFetcherFactory> fake_factory_; | 307 scoped_ptr<FakeURLFetcherFactory> fake_factory_; |
| 308 | 308 |
| 309 // The URLFetcherFactory instance used to instantiate |fake_factory_|. | 309 // The URLFetcherFactory instance used to instantiate |fake_factory_|. |
| 310 scoped_ptr<URLFetcherFactory> factory_; | 310 scoped_ptr<URLFetcherFactory> factory_; |
| 311 | 311 |
| 312 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 312 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
| 313 }; | 313 }; |
| 314 | 314 |
| 315 DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncTest); | 315 DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncTest); |
| 316 | 316 |
| 317 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 317 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| OLD | NEW |