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

Unified Diff: android_webview/common/aw_utils.cc

Issue 10920033: Implement Android WebView BlockNetworkImages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update ContentSetting to new locking semantics. Add a test that does not require http server. Created 8 years, 3 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: android_webview/common/aw_utils.cc
diff --git a/android_webview/common/aw_utils.cc b/android_webview/common/aw_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0414a1c292c787ed04cef6b30b35b8a1d373264a
--- /dev/null
+++ b/android_webview/common/aw_utils.cc
@@ -0,0 +1,18 @@
+// 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.
+
+#include "android_webview/common/aw_utils.h"
+
+#include "content/public/common/url_constants.h"
+#include "googleurl/src/gurl.h"
+
+namespace android_webview {
+
+bool isLocalScheme(const GURL& url) {
mnaganov (inactive) 2012/09/25 09:55:53 I think this may not work in case of GMail, becaus
boliu 2012/09/25 16:55:12 I thought I could reuse this for BlockNetworkLoads
+ return url.SchemeIs(chrome::kFileScheme) ||
+ url.SchemeIs(chrome::kDataScheme) ||
+ url.SchemeIs(chrome::kContentScheme);
+}
+
+} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698