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

Unified Diff: chrome/browser/extensions/api/dial/dial_api.cc

Issue 2668383004: [DIAL] Break circular dependency in DialFetchDeviceDescriptionFunction. (Closed)
Patch Set: Created 3 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698