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

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

Issue 8992034: Merge 114608, 115692 to 963 (M17) branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: rebasing, checking for diffs before merge Created 9 years 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
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc ('k') | chrome/browser/ui/webui/sync_promo_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_promo_handler.h
diff --git a/chrome/browser/ui/webui/sync_promo_handler.h b/chrome/browser/ui/webui/sync_promo_handler.h
deleted file mode 100644
index d0534e45dec32563a870c9e67550ea0a0a50101b..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/sync_promo_handler.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_HANDLER_H_
-#define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_HANDLER_H_
-#pragma once
-
-#include "chrome/browser/ui/webui/sync_setup_handler.h"
-
-class PrefService;
-
-// The handler for JavaScript messages related to the "sync promo" page.
-class SyncPromoHandler : public SyncSetupHandler {
- public:
- explicit SyncPromoHandler(ProfileManager* profile_manager);
- virtual ~SyncPromoHandler();
-
- // Called to register our preferences before we use them (so there will be a
- // default if not present yet).
- static void RegisterUserPrefs(PrefService* prefs);
-
- // WebUIMessageHandler implementation.
- virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE;
- virtual void RegisterMessages() OVERRIDE;
-
- // SyncSetupFlowHandler implementation.
- virtual void ShowGaiaSuccessAndClose() OVERRIDE;
- virtual void ShowGaiaSuccessAndSettingUp() OVERRIDE;
- virtual void ShowConfigure(const base::DictionaryValue& args) OVERRIDE;
-
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- protected:
- virtual void StepWizardForShowSetupUI() OVERRIDE;
-
- virtual void ShowSetupUI() OVERRIDE;
-
- private:
- // JavaScript callback handler to close the sync promo.
- void HandleCloseSyncPromo(const base::ListValue* args);
-
- // JavaScript callback handler to initialize the sync promo.
- void HandleInitializeSyncPromo(const base::ListValue* args);
-
- // JavaScript handler to record the duration for which the throbber was
- // visible during an attempted sign-in flow.
- void HandleRecordThrobberTime(const base::ListValue* args);
-
- // JavaScript handler to record the number of times a user attempted to sign
- // in to chrome while they were on the sync promo page.
- void HandleRecordSignInAttempts(const base::ListValue* args);
-
- // JavaScript callback handler to switch the advanced sync settings. |args| is
- // the list of arguments passed from JS and should be an empty list.
- void HandleShowAdvancedSettings(const base::ListValue* args);
-
- // JavaScript callback handler to record user actions on the sync promo.
- void HandleUserFlowAction(const base::ListValue* args);
-
- // JavaScript callback handler for when a user clicks skip.
- void HandleUserSkipped(const base::ListValue* args);
-
- // Return the number of times the user with the current profile has seen the
- // sync promo.
- int GetViewCount() const;
-
- // Increment the local view count by the specified non-negative integer
- // amount. Returns the new total view count.
- int IncrementViewCountBy(unsigned int amount);
-
- // Record a user's flow through the promo to our histogram in UMA.
- void RecordUserFlowAction(int action);
-
- // Load any experiments that run on the promo page.
- void LoadPromoExperiments();
-
- // Use this to register for certain notifications (currently when tabs or
- // windows close).
- content::NotificationRegistrar registrar_;
-
- // Weak reference that's initialized and checked in Attach() (after that
- // guaranteed to be non-NULL).
- PrefService* prefs_;
-
- // If the user closes the whole window we'll get a close notification from the
- // tab as well, so this bool acts as a small mutex to only report the close
- // method once.
- bool window_already_closed_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncPromoHandler);
-};
-
-#endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_HANDLER_H_
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc ('k') | chrome/browser/ui/webui/sync_promo_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698