Chromium Code Reviews| Index: chrome/browser/shell_integration.h |
| diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h |
| index a1ce234b3a90fb0ef6aa8be11baa389558659806..200810b3b1b6e1c9569dfd56ed1251884ff07bb6 100644 |
| --- a/chrome/browser/shell_integration.h |
| +++ b/chrome/browser/shell_integration.h |
| @@ -167,6 +167,9 @@ class ShellIntegration { |
| virtual ~DefaultWebClientObserver() {} |
| // Updates the UI state to reflect the current default browser state. |
| virtual void SetDefaultWebClientUIState(DefaultWebClientUIState state) = 0; |
| + // Called to notify the UI of the immediate result of invoking |
| + // SetAsDefault. |
| + virtual void OnSetAsDefaultConcluded(bool succeeded) { } |
| // Observer classes that return true to OwnedByWorker are automatically |
| // freed by the worker when they are no longer needed. |
| virtual bool IsOwnedByWorker() { return false; } |
| @@ -208,7 +211,7 @@ class ShellIntegration { |
| virtual DefaultWebClientState CheckIsDefault() = 0; |
| // Function that sets Chrome as the default web client. |
| - virtual void SetAsDefault(bool interactive_permitted) = 0; |
| + virtual bool SetAsDefault(bool interactive_permitted) = 0; |
|
grt (UTC plus 2)
2012/06/20 19:42:12
document meaning of return value
motek.
2012/06/20 22:02:29
Done.
|
| // Function that handles performing the check on the file thread. This |
| // function is posted as a task onto the file thread, where it performs |
| @@ -222,7 +225,7 @@ class ShellIntegration { |
| // Once it is finished the CompleteSetAsDefault function is posted to the |
| // UI thread which will check the status of Chrome as the default, and |
| // send this to the observer. |
| - void ExecuteSetAsDefault(); |
| + void ExecuteSetAsDefault(bool interactive_permitted); |
|
grt (UTC plus 2)
2012/06/20 19:42:12
document interactive_permitted
motek.
2012/06/20 22:02:29
Done.
|
| // Communicate results to the observer. This function is posted as a task |
| // onto the UI thread by the ExecuteCheckIsDefault function running in the |
| @@ -234,7 +237,7 @@ class ShellIntegration { |
| // ExecuteSetAsDefault function running in the file thread. This function |
| // will the start the check process, which, if an observer is present, |
| // reports to it the new status. |
| - void CompleteSetAsDefault(); |
| + void CompleteSetAsDefault(bool call_result); |
|
grt (UTC plus 2)
2012/06/20 19:42:12
call_result -> succeeded?
also, document
motek.
2012/06/20 22:02:29
Done.
|
| // Updates the UI in our associated view with the current default web |
| // client state. |
| @@ -257,7 +260,7 @@ class ShellIntegration { |
| virtual DefaultWebClientState CheckIsDefault() OVERRIDE; |
| // Set Chrome as the default browser. |
| - virtual void SetAsDefault(bool interactive_permitted) OVERRIDE; |
| + virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; |
| DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); |
| }; |
| @@ -281,7 +284,7 @@ class ShellIntegration { |
| virtual DefaultWebClientState CheckIsDefault() OVERRIDE; |
| // Set Chrome as the default handler for this protocol. |
| - virtual void SetAsDefault(bool interactive_permitted) OVERRIDE; |
| + virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; |
| std::string protocol_; |