summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/sync_setup_handler.h
diff options
context:
space:
mode:
authorperia@chromium.org <peria@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 10:33:15 +0000
committerperia@chromium.org <peria@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 10:33:15 +0000
commit9bc48646f77da626baf7f1f1aed4ccc7db3a4ea6 (patch)
tree7e603f73756b288588b61acecf0c5db8e6ccf7c3 /chrome/browser/ui/webui/sync_setup_handler.h
parent5c2a198b6d137e3698af4ac3224575e789032510 (diff)
downloadchromium_src-9bc48646f77da626baf7f1f1aed4ccc7db3a4ea6.zip
chromium_src-9bc48646f77da626baf7f1f1aed4ccc7db3a4ea6.tar.gz
chromium_src-9bc48646f77da626baf7f1f1aed4ccc7db3a4ea6.tar.bz2
On timeout of setting up sync, show a dialog to tell users the task longer time than expected and to enable them to close spinner window.
BUG=128692 TEST=manually Review URL: https://chromiumcodereview.appspot.com/10539128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/sync_setup_handler.h')
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/ui/webui/sync_setup_handler.h b/chrome/browser/ui/webui/sync_setup_handler.h
index b2505d0..d319476 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_ui.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
@@ -109,6 +110,7 @@ class SyncSetupHandler : public options2::OptionsPageUIHandler,
void HandleShowSetupUIWithoutLogin(const base::ListValue* args);
void HandleDoSignOutOnAuthError(const base::ListValue* args);
void HandleStopSyncing(const base::ListValue* args);
+ void HandleCloseTimeout(const base::ListValue* args);
// Helper routine that gets the Profile associated with this object (virtual
// so tests can override).
@@ -141,7 +143,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 +197,10 @@ 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_;
+
DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
};