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

Unified Diff: content/browser/loader/offline_policy.h

Issue 271543005: Removed offline policy; it's not being used, and we have no plans to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to TOT. Created 6 years, 7 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 | « chrome/browser/about_flags.cc ('k') | content/browser/loader/offline_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/offline_policy.h
diff --git a/content/browser/loader/offline_policy.h b/content/browser/loader/offline_policy.h
deleted file mode 100644
index 975d4adb1709028ca80d1d2125cbc815aa9213b2..0000000000000000000000000000000000000000
--- a/content/browser/loader/offline_policy.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2013 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 CONTENT_BROWSER_LOADER_OFFLINE_POLICY
-#define CONTENT_BROWSER_LOADER_OFFLINE_POLICY
-
-#include <map>
-
-#include "base/basictypes.h"
-#include "content/common/content_export.h"
-
-struct ResourceHostMsg_Request;
-
-namespace net {
-class HttpResponseInfo;
-class URLRequest;
-}
-
-namespace content {
-
-// This class controls under what conditions resources will be fetched
-// from cache even if stale rather than from the network. For example,
-// one policy would be that if requests for a particular route (e.g. "tab")
-// is unable to reach the server, other requests made with the same route
-// can be loaded from cache without first requiring a network timeout.
-//
-// There is a single OfflinePolicy object per user navigation unit
-// (generally a tab).
-class CONTENT_EXPORT OfflinePolicy {
- public:
- OfflinePolicy();
- ~OfflinePolicy();
-
- // Return any additional load flags to be ORed for a request from
- // this route with the given |resource_type|. |reset_state| indicates
- // that this request should reinitialized the internal state for this
- // policy object (e.g. in the case of a main frame load).
- int GetAdditionalLoadFlags(int current_flags, bool reset_state);
-
- // Incorporate online/offline information from a successfully started request.
- void UpdateStateForSuccessfullyStartedRequest(
- const net::HttpResponseInfo& response_info);
-
-private:
- enum State { INIT, ONLINE, OFFLINE };
-
- void RecordAndResetStats();
-
- bool enabled_;
- State state_;
- int resource_loads_initiated_;
- int resource_loads_successfully_started_;
-
- DISALLOW_COPY_AND_ASSIGN(OfflinePolicy);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_LOADER_OFFLINE_POLICY
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/loader/offline_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698