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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.h

Issue 10539128: Set timeout in sync setup (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Do not show GAIA login on timeout Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/sync_setup_handler.h
diff --git a/chrome/browser/ui/webui/sync_setup_handler.h b/chrome/browser/ui/webui/sync_setup_handler.h
index 51cc5b2ee55f19a8cabaab2f292b128e4d95439e..cd273d47491cb162d4a2e2fd1b8e8eb8b9300cc0 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.h
+++ b/chrome/browser/ui/webui/sync_setup_handler.h
@@ -7,6 +7,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/timer.h"
#include "chrome/browser/signin/signin_tracker.h"
#include "chrome/browser/ui/webui/options2/options_ui2.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
@@ -141,7 +142,10 @@ class SyncSetupHandler : public options2::OptionsPageUIHandler,
// is running in the background.
void DisplaySpinner();
- // Returns true if this is the active login object.
+ // Displays an error dialog which shows timeout of starting the sync backend.
+ void DisplayTimeout();
+
+ // Returns true if this object is the active login object.
bool IsActiveLogin() const;
// Initiates a login via the signin manager.
@@ -192,6 +196,14 @@ class SyncSetupHandler : public options2::OptionsPageUIHandler,
// When setup starts without login UI, do not retry login and fail.
bool retry_on_signin_failure_;
+ // The OneShotTimer object used to timeout of starting the sync backend
+ // service.
+ scoped_ptr<base::OneShotTimer<SyncSetupHandler> > backend_start_timer_;
+
+ // Set to true when setup sync backend timeouts. This is used to check if
+ // timeout dialog is visible and not to show other dialogs.
+ bool visible_timeout_;
+
DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
};

Powered by Google App Engine
This is Rietveld 408576698