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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 13923007: Remove --allow-request-os-file-handle option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary #include Created 7 years, 8 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/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index f2c7bbb05a54c78db8709534f14b630c4709b429..d5fd8388b5e0663fda5bb93b92614d27cf34b943 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -11,7 +11,6 @@
#include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "base/string_util.h"
-#include "base/strings/string_tokenizer.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/child_process_logging.h"
@@ -346,10 +345,6 @@ void ChromeContentRendererClient::RenderThreadStarted() {
extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate(
permissions);
RegisterExtensionManifestHandlers();
-
- RegisterRequestOSFileHandleAllowedHosts(
- command_line->GetSwitchValueASCII(
- switches::kAllowRequestOSFileHandleAPI));
}
void ChromeContentRendererClient::RenderViewCreated(
@@ -1203,39 +1198,4 @@ bool ChromeContentRendererClient::AllowBrowserPlugin(
tag_name.equals(WebString::fromUTF8(kAdViewTagName));
}
-void ChromeContentRendererClient::RegisterRequestOSFileHandleAllowedHosts(
- const std::string& allowed_list) {
- if (!allowed_list.empty()) {
- base::StringTokenizer t(allowed_list, ",");
- while (t.GetNext()) {
- request_os_file_handle_allowed_hosts_.push_back(t.token());
- }
- }
-}
-
-bool ChromeContentRendererClient::IsRequestOSFileHandleAllowedForURL(
- const GURL& url) const {
- if (!url.is_valid() || !url.SchemeIsFileSystem() || !url.inner_url()) {
- return false;
- }
-
- const GURL& inner = *url.inner_url();
- if (!inner.is_valid())
- return false;
-
- if (inner.SchemeIs(extensions::kExtensionScheme)) {
- // TODO(hamaji): We don't need this whitelist once this issue is
- // fixed: http://crbug.com/224123 http://crbug.com/224753
- if (inner.host() == "dolnidnbiendbodmklboojlnlpdeeipo")
- return true;
- }
-
- for (size_t i = 0; i < request_os_file_handle_allowed_hosts_.size(); ++i) {
- if (MatchPattern(inner.host(), request_os_file_handle_allowed_hosts_[i]))
- return true;
- }
-
- return false;
-}
-
} // namespace chrome
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | chrome/renderer/chrome_content_renderer_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698