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

Unified Diff: chrome/browser/privacy_blacklist/blocked_response.h

Issue 501082: Implement delaying resource requests until privacy blacklists are ready. (Closed)
Patch Set: don't get stuck on errors Created 10 years, 12 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: chrome/browser/privacy_blacklist/blocked_response.h
diff --git a/chrome/browser/privacy_blacklist/blocked_response.h b/chrome/browser/privacy_blacklist/blocked_response.h
deleted file mode 100644
index 2d38b6e27ffb45344cf179a924a26ef61b7d82ac..0000000000000000000000000000000000000000
--- a/chrome/browser/privacy_blacklist/blocked_response.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2009 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_PRIVACY_BLACKLIST_BLOCKED_RESPONSE_H_
-#define CHROME_BROWSER_PRIVACY_BLACKLIST_BLOCKED_RESPONSE_H_
-
-#include <string>
-#include <set>
-
-#include "chrome/browser/privacy_blacklist/blacklist.h"
-
-namespace chrome {
-
-extern const char kUnblockScheme[];
-extern const char kBlockScheme[];
-
-// Generate localized responses to replace blacklisted resources.
-// Blacklisted resources such as frames and iframes are replaced
-// by HTML. Non visual resources such as Javascript and CSS are
-// simply be cancelled so there is no blocked response for them.
-
-class BlockedResponse {
- public:
- BlockedResponse() {}
-
- // Returns the HTML document used as substituted content for blacklisted
- // elements.
- std::string GetHTML(const std::string& url, const Blacklist::Match* match);
-
- // Returns the image (as a string because that is what is expected by callers)
- // used as substituted content for blacklisted elements.
- std::string GetImage(const Blacklist::Match* match);
-
- // Returns HTTP headers for a blocked response replacing the given url.
- std::string GetHeaders(const std::string& url);
-
- // Gets the original url of a blocked resource from its blocked url.
- // The input must be a chome-unblock://XXX url. If the unblock url is
- // not found, then about:blank is returned.
- std::string GetOriginalURL(const std::string& url);
-
- private:
- // Returns a chrome-block://XXX link for the given requested URL.
- std::string GetBlockedURL(const std::string& url);
-
- // Returns a chrome-unblock://XXX link for the given chrome-block://YYY url.
- std::string GetUnblockedURL(const std::string& url);
-
- std::set<std::string> blocked_;
-
- DISALLOW_COPY_AND_ASSIGN(BlockedResponse);
-};
-
-}
-
-#endif // CHROME_BROWSER_PRIVACY_BLACKLIST_BLOCKED_RESPONSE_H_
« no previous file with comments | « chrome/browser/privacy_blacklist/blacklist_ui.cc ('k') | chrome/browser/privacy_blacklist/blocked_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698