Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

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

Issue 6010007: Logging tweak for sync integration test harness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/live_sync/many_client_live_preferences_sync_test.cc » ('j') | 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/prefs/pref_service.h" 6 #include "chrome/browser/prefs/pref_service.h"
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/net/gaia/token_service.h" 8 #include "chrome/browser/net/gaia/token_service.h"
9 #include "chrome/browser/sync/glue/sync_backend_host.h" 9 #include "chrome/browser/sync/glue/sync_backend_host.h"
10 #include "chrome/browser/sync/profile_sync_service_harness.h" 10 #include "chrome/browser/sync/profile_sync_service_harness.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 MessageLoop* loop = MessageLoop::current(); 417 MessageLoop* loop = MessageLoop::current();
418 bool did_allow_nestable_tasks = loop->NestableTasksAllowed(); 418 bool did_allow_nestable_tasks = loop->NestableTasksAllowed();
419 loop->SetNestableTasksAllowed(true); 419 loop->SetNestableTasksAllowed(true);
420 loop->PostDelayedTask( 420 loop->PostDelayedTask(
421 FROM_HERE, 421 FROM_HERE,
422 NewRunnableMethod(timeout_signal.get(), 422 NewRunnableMethod(timeout_signal.get(),
423 &StateChangeTimeoutEvent::Callback), 423 &StateChangeTimeoutEvent::Callback),
424 timeout_milliseconds); 424 timeout_milliseconds);
425 loop->Run(); 425 loop->Run();
426 loop->SetNestableTasksAllowed(did_allow_nestable_tasks); 426 loop->SetNestableTasksAllowed(did_allow_nestable_tasks);
427 LogClientInfo("AwaitStatusChangeWithTimeout succeeded"); 427 if (timeout_signal->Abort()) {
428 return timeout_signal->Abort(); 428 LogClientInfo("AwaitStatusChangeWithTimeout succeeded");
429 return true;
430 } else {
431 LogClientInfo("AwaitStatusChangeWithTimeout timed out");
432 return false;
433 }
429 } 434 }
430 435
431 ProfileSyncService::Status ProfileSyncServiceHarness::GetStatus() { 436 ProfileSyncService::Status ProfileSyncServiceHarness::GetStatus() {
432 DCHECK(service() != NULL) << "GetStatus(): service() is NULL."; 437 DCHECK(service() != NULL) << "GetStatus(): service() is NULL.";
433 return service()->QueryDetailedSyncStatus(); 438 return service()->QueryDetailedSyncStatus();
434 } 439 }
435 440
436 bool ProfileSyncServiceHarness::IsSynced() { 441 bool ProfileSyncServiceHarness::IsSynced() {
437 LogClientInfo("IsSynced"); 442 LogClientInfo("IsSynced");
438 if (service() == NULL) 443 if (service() == NULL)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 << ", service_is_pushing_changes: " << ServiceIsPushingChanges(); 567 << ", service_is_pushing_changes: " << ServiceIsPushingChanges();
563 } else { 568 } else {
564 VLOG(1) << "Client " << id_ << ": " << message 569 VLOG(1) << "Client " << id_ << ": " << message
565 << ": Sync session snapshot not available."; 570 << ": Sync session snapshot not available.";
566 } 571 }
567 } else { 572 } else {
568 VLOG(1) << "Client " << id_ << ": " << message 573 VLOG(1) << "Client " << id_ << ": " << message
569 << ": Sync service not available."; 574 << ": Sync service not available.";
570 } 575 }
571 } 576 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/live_sync/many_client_live_preferences_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698