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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.h

Issue 8729009: Implement an AutoLaunch experiment for Chrome for certain brand codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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/browser_init.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/browser_options_handler.h
===================================================================
--- chrome/browser/ui/webui/options/browser_options_handler.h (revision 114230)
+++ chrome/browser/ui/webui/options/browser_options_handler.h (working copy)
@@ -8,6 +8,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_member.h"
@@ -89,6 +90,22 @@
void EnableInstant(const ListValue* args);
void DisableInstant(const ListValue* args);
+ // Enables/disables auto-launching of Chrome on computer startup.
+ void ToggleAutoLaunch(const ListValue* args);
+
+ // Checks (on the file thread) whether the user is in the auto-launch trial
+ // and whether Chrome is set to auto-launch at login. Gets a reply on the UI
+ // thread (see CheckAutoLaunchCallback). A weak pointer to this is passed in
+ // as a parameter to avoid the need to lock between this function and the
+ // destructor.
+
+ void CheckAutoLaunch(base::WeakPtr<BrowserOptionsHandler> weak_this);
+ // Sets up (on the UI thread) the necessary bindings for toggling auto-launch
+ // (if the user is part of the auto-launch and makes sure the HTML UI knows
+ // whether Chrome will auto-launch at login.
+ void CheckAutoLaunchCallback(bool is_in_auto_launch_group,
+ bool will_launch_at_login);
+
// Called to request information about the Instant field trial.
void GetInstantFieldTrialStatus(const ListValue* args);
@@ -130,6 +147,11 @@
scoped_ptr<AutocompleteController> autocomplete_controller_;
+ // Used to get |weak_ptr_| to self for use on the File thread.
+ base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_file_;
+ // Used to post update tasks to the UI thread.
+ base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_ui_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler);
};
« no previous file with comments | « chrome/browser/ui/browser_init.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698