Index: chrome/browser/net/resource_prefetch_predictor_observer.h |
diff --git a/chrome/browser/net/resource_prefetch_predictor_observer.h b/chrome/browser/net/resource_prefetch_predictor_observer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e94562819bd20529cb86a0fa56777e772e8527b0 |
--- /dev/null |
+++ b/chrome/browser/net/resource_prefetch_predictor_observer.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_NET_RESOURCE_PREFETCH_PREDICTOR_OBSERVER_H_ |
+#define CHROME_BROWSER_NET_RESOURCE_PREFETCH_PREDICTOR_OBSERVER_H_ |
+#pragma once |
+ |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/predictors/resource_prefetch_predictor.h" |
+ |
+namespace net { |
+class URLRequest; |
+} |
+ |
+namespace chrome_browser_net { |
+ |
+class ResourcePrefetchPredictorObserver { |
willchan no longer on Chromium
2012/05/31 02:08:58
Can you add a class comment explaining what you're
Shishir
2012/06/02 01:19:29
Done.
|
+ public: |
+ explicit ResourcePrefetchPredictorObserver( |
+ predictors::ResourcePrefetchPredictor* predictor); |
+ ~ResourcePrefetchPredictorObserver(); |
+ |
+ // Parts of the NetworkDelegate that we want to observe. |
willchan no longer on Chromium
2012/05/31 02:08:58
Not NetworkDelegate
Shishir
2012/06/02 01:19:29
Done.
|
+ void OnRequestStarted(net::URLRequest* request, |
+ ResourceType::Type resource_type, |
+ int child_id, |
+ int route_id); |
+ void OnRequestRedirected(net::URLRequest* request); |
+ void OnResponseStarted(net::URLRequest* request); |
+ |
+ private: |
+ base::WeakPtr<predictors::ResourcePrefetchPredictor> predictor_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorObserver); |
willchan no longer on Chromium
2012/05/31 02:08:58
include basictypes.h for this macro definition
Shishir
2012/06/02 01:19:29
Done.
|
+}; |
+ |
+} // namespace chrome_browser_net |
+ |
+#endif // CHROME_BROWSER_NET_RESOURCE_PREFETCH_PREDICTOR_OBSERVER_H_ |