Chromium Code Reviews

Side by Side Diff: chrome/browser/sync/profile_sync_service_harness.cc

Issue 6125006: Increasing live (sync) operation timeout to 45 seconds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/net/gaia/token_service.h" 13 #include "chrome/browser/net/gaia/token_service.h"
14 #include "chrome/browser/sync/glue/sync_backend_host.h" 14 #include "chrome/browser/sync/glue/sync_backend_host.h"
15 #include "chrome/browser/sync/sessions/session_state.h" 15 #include "chrome/browser/sync/sessions/session_state.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/common/net/gaia/gaia_constants.h" 17 #include "chrome/common/net/gaia/gaia_constants.h"
18 #include "chrome/common/net/gaia/google_service_auth_error.h" 18 #include "chrome/common/net/gaia/google_service_auth_error.h"
19 #include "chrome/common/notification_source.h" 19 #include "chrome/common/notification_source.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 21
22 // The default value for min_timestamp_needed_ when we're not in the 22 // The default value for min_timestamp_needed_ when we're not in the
23 // WAITING_FOR_UPDATES state. 23 // WAITING_FOR_UPDATES state.
24 static const int kMinTimestampNeededNone = -1; 24 static const int kMinTimestampNeededNone = -1;
25 25
26 // The amount of time for which we wait for a live sync operation to complete. 26 // The amount of time for which we wait for a live sync operation to complete.
27 static const int kLiveSyncOperationTimeoutMs = 30000; 27 static const int kLiveSyncOperationTimeoutMs = 45000;
28 28
29 // Simple class to implement a timeout using PostDelayedTask. If it is not 29 // Simple class to implement a timeout using PostDelayedTask. If it is not
30 // aborted before picked up by a message queue, then it asserts with the message 30 // aborted before picked up by a message queue, then it asserts with the message
31 // provided. This class is not thread safe. 31 // provided. This class is not thread safe.
32 class StateChangeTimeoutEvent 32 class StateChangeTimeoutEvent
33 : public base::RefCountedThreadSafe<StateChangeTimeoutEvent> { 33 : public base::RefCountedThreadSafe<StateChangeTimeoutEvent> {
34 public: 34 public:
35 StateChangeTimeoutEvent(ProfileSyncServiceHarness* caller, 35 StateChangeTimeoutEvent(ProfileSyncServiceHarness* caller,
36 const std::string& message); 36 const std::string& message);
37 37
(...skipping 555 matching lines...)
593 << ", service_is_pushing_changes: " << ServiceIsPushingChanges(); 593 << ", service_is_pushing_changes: " << ServiceIsPushingChanges();
594 } else { 594 } else {
595 VLOG(1) << "Client " << id_ << ": " << message 595 VLOG(1) << "Client " << id_ << ": " << message
596 << ": Sync session snapshot not available."; 596 << ": Sync session snapshot not available.";
597 } 597 }
598 } else { 598 } else {
599 VLOG(1) << "Client " << id_ << ": " << message 599 VLOG(1) << "Client " << id_ << ": " << message
600 << ": Sync service not available."; 600 << ": Sync service not available.";
601 } 601 }
602 } 602 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine