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/profile_sync_service_harness.h" | 5 #include "chrome/browser/sync/profile_sync_service_harness.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <set> | 10 #include <set> |
11 #include <sstream> | 11 #include <sstream> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/base64.h" | 14 #include "base/base64.h" |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/json/json_writer.h" | 18 #include "base/json/json_writer.h" |
19 #include "base/location.h" | 19 #include "base/location.h" |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
22 #include "base/message_loop.h" | 22 #include "base/message_loop.h" |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/signin/signin_manager.h" | 24 #include "chrome/browser/signin/signin_manager.h" |
25 #include "chrome/browser/sync/glue/data_type_controller.h" | 25 #include "chrome/browser/sync/glue/data_type_controller.h" |
26 #include "chrome/browser/sync/profile_sync_service_factory.h" | 26 #include "chrome/browser/sync/profile_sync_service_factory.h" |
27 #include "chrome/browser/sync/sync_ui_util.h" | 27 #include "chrome/browser/sync/sync_ui_util.h" |
28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
29 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" | 29 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
| 30 #include "sync/internal_api/public/util/sync_string_conversions.h" |
30 | 31 |
31 using syncer::sessions::SyncSessionSnapshot; | 32 using syncer::sessions::SyncSessionSnapshot; |
32 | 33 |
33 // TODO(rsimha): Remove the following lines once crbug.com/91863 is fixed. | 34 // TODO(rsimha): Remove the following lines once crbug.com/91863 is fixed. |
34 // The amount of time for which we wait for a live sync operation to complete. | 35 // The amount of time for which we wait for a live sync operation to complete. |
35 static const int kLiveSyncOperationTimeoutMs = 45000; | 36 static const int kLiveSyncOperationTimeoutMs = 45000; |
36 | 37 |
37 // The amount of time we wait for test cases that verify exponential backoff. | 38 // The amount of time we wait for test cases that verify exponential backoff. |
38 static const int kExponentialBackoffVerificationTimeoutMs = 60000; | 39 static const int kExponentialBackoffVerificationTimeoutMs = 60000; |
39 | 40 |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1106 |
1106 std::string ProfileSyncServiceHarness::GetServiceStatus() { | 1107 std::string ProfileSyncServiceHarness::GetServiceStatus() { |
1107 DictionaryValue value; | 1108 DictionaryValue value; |
1108 sync_ui_util::ConstructAboutInformation(service_, &value); | 1109 sync_ui_util::ConstructAboutInformation(service_, &value); |
1109 std::string service_status; | 1110 std::string service_status; |
1110 base::JSONWriter::WriteWithOptions(&value, | 1111 base::JSONWriter::WriteWithOptions(&value, |
1111 base::JSONWriter::OPTIONS_PRETTY_PRINT, | 1112 base::JSONWriter::OPTIONS_PRETTY_PRINT, |
1112 &service_status); | 1113 &service_status); |
1113 return service_status; | 1114 return service_status; |
1114 } | 1115 } |
OLD | NEW |