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

Unified Diff: content/browser/download/download_item_impl.h

Issue 17515003: [Downloads] Move UpdateObservers out of TransitionTo in DownloadItemImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore necessary UpdateObservers() call Created 7 years, 6 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 | « content/browser/download/download_browsertest.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_item_impl.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index 09d3f42b6217adeb98f45cf210247db371a1fda4..3cb2c1fc4244406bd64371861d945d4f2d4b71be 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -276,6 +276,13 @@ class CONTENT_EXPORT DownloadItemImpl
MAX_DOWNLOAD_INTERNAL_STATE,
};
+ // Used with TransitionTo() to indicate whether or not to call
+ // UpdateObservers() after the state transition.
+ enum ShouldUpdateObservers {
+ UPDATE_OBSERVERS,
+ DONT_UPDATE_OBSERVERS
+ };
+
// Normal progression of a download ------------------------------------------
// These are listed in approximately chronological order. There are also
@@ -346,7 +353,10 @@ class CONTENT_EXPORT DownloadItemImpl
bool IsDownloadReadyForCompletion(const base::Closure& state_change_notify);
// Call to transition state; all state transitions should go through this.
- void TransitionTo(DownloadInternalState new_state);
+ // |notify_action| specifies whether or not to call UpdateObservers() after
+ // the state transition.
+ void TransitionTo(DownloadInternalState new_state,
+ ShouldUpdateObservers notify_action);
// Set the |danger_type_| and invoke obserers if necessary.
void SetDangerType(DownloadDangerType danger_type);
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698