Chromium Code Reviews| Index: chrome/browser/extensions/api/dial/dial_api.cc |
| diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc |
| index 6099c0277d891a24400da675b77269a342d7dfe3..a055355a0c0bacd798c0d00c705b75be80eabab2 100644 |
| --- a/chrome/browser/extensions/api/dial/dial_api.cc |
| +++ b/chrome/browser/extensions/api/dial/dial_api.cc |
| @@ -240,6 +240,7 @@ void DialFetchDeviceDescriptionFunction::MaybeStartFetch(const GURL& url) { |
| void DialFetchDeviceDescriptionFunction::OnFetchComplete( |
|
mark a. foltz
2017/02/02 20:27:32
Can you add a comment in device_description_fetche
imcheng
2017/02/02 20:44:31
I added comment here explaining why we have to des
|
| const api::dial::DialDeviceDescriptionData& result) { |
| + device_description_fetcher_.reset(); |
|
mark a. foltz
2017/02/02 20:27:32
Would resetting the non-invoked callback in Device
imcheng
2017/02/02 20:44:31
Yes, that would work too. But I see no reason to h
|
| api::dial::DialDeviceDescription device_description; |
| device_description.device_label = params_->device_label; |
| device_description.app_url = result.app_url.spec(); |
| @@ -250,6 +251,7 @@ void DialFetchDeviceDescriptionFunction::OnFetchComplete( |
| void DialFetchDeviceDescriptionFunction::OnFetchError( |
| const std::string& message) { |
| + device_description_fetcher_.reset(); |
| SetError(message); |
| SendResponse(false); |
| } |