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

Unified Diff: net/base/load_states.h

Issue 7523042: Add a status message "Waiting for extension Foo..." when there's a request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final Created 9 years, 4 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/tab_contents/tab_contents.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/load_states.h
diff --git a/net/base/load_states.h b/net/base/load_states.h
index a3e5339fa5da231a9d3be7d99560a69bafc14370..2f4911ed67b9ad80fb7f957e6be2a198605000c4 100644
--- a/net/base/load_states.h
+++ b/net/base/load_states.h
@@ -6,6 +6,8 @@
#define NET_BASE_LOAD_STATES_H__
#pragma once
+#include "base/string16.h"
+
namespace net {
// These states correspond to the lengthy periods of time that a resource load
@@ -17,6 +19,13 @@ enum LoadState {
// called Read yet).
LOAD_STATE_IDLE,
+ // This state indicates that the URLRequest delegate has chosen to block this
+ // request before it was sent over the network. When in this state, the
+ // delegate should set a load state parameter on the URLRequest describing
+ // the nature of the delay (i.e. "Waiting for <description given by
+ // delegate>").
+ LOAD_STATE_WAITING_FOR_DELEGATE,
+
// This state corresponds to a resource load that is blocked waiting for
// access to a resource in the cache. If multiple requests are made for the
// same resource, the first request will be responsible for writing (or
@@ -69,6 +78,17 @@ enum LoadState {
LOAD_STATE_READING_RESPONSE,
};
+// Some states, like LOAD_STATE_WAITING_FOR_DELEGATE, are associated with extra
+// data that describes more precisely what the delegate (for example) is doing.
+// This class provides an easy way to hold a load state with an extra parameter.
+struct LoadStateWithParam {
+ LoadState state;
+ string16 param;
+ LoadStateWithParam() {}
+ LoadStateWithParam(LoadState state, const string16& param)
+ : state(state), param(param) {}
+};
+
} // namespace net
#endif // NET_BASE_LOAD_STATES_H__
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698