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

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: comments Created 9 years, 5 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
Index: net/base/load_states.h
diff --git a/net/base/load_states.h b/net/base/load_states.h
index a3e5339fa5da231a9d3be7d99560a69bafc14370..7fad6ce52c8cd4073cf1c36828a62f34feceb3de 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 <string>
+
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;
+ std::string param;
eroman 2011/08/05 01:54:22 Can you make this a string16? Seems there are alre
Matt Perry 2011/08/08 22:14:33 Done.
+ LoadStateWithParam() {}
+ LoadStateWithParam(LoadState state, const std::string& param)
+ : state(state), param(param) {}
+};
+
} // namespace net
#endif // NET_BASE_LOAD_STATES_H__

Powered by Google App Engine
This is Rietveld 408576698