Chromium Code Reviews| Index: services/shell/public/cpp/shell_connection.h |
| diff --git a/services/shell/public/cpp/shell_connection.h b/services/shell/public/cpp/shell_connection.h |
| index 7f8928bb76514dd75805ad91b6f12f8954df05e7..6ea31593f29bc0074d71c278f9624f1258a7d19b 100644 |
| --- a/services/shell/public/cpp/shell_connection.h |
| +++ b/services/shell/public/cpp/shell_connection.h |
| @@ -63,9 +63,9 @@ class ShellConnection : public mojom::ShellClient { |
| void SetAppTestConnectorForTesting(mojom::ConnectorPtr connector); |
| // Specify a function to be called when the connection to the shell is lost. |
| - void set_connection_lost_closure(const base::Closure& closure) { |
| - connection_lost_closure_ = closure; |
| - } |
| + // Note that if connection has already been lost, then |closure| is called |
| + // immediately. |
| + void SetConnectionLostClosure(const base::Closure& closure); |
| private: |
| // mojom::ShellClient: |
| @@ -95,6 +95,7 @@ class ShellConnection : public mojom::ShellClient { |
| mojo::Binding<mojom::ShellClient> binding_; |
| std::unique_ptr<Connector> connector_; |
| shell::Identity identity_; |
| + bool should_run_connection_lost_closure_; |
|
Ben Goodger (Google)
2016/04/27 22:29:20
= false;
sadrul
2016/04/27 22:45:11
Done.
|
| base::Closure connection_lost_closure_; |