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

Unified Diff: chrome/renderer/renderer_webapplicationcachehost_impl.cc

Issue 1600002: Indicate in the tab UI if appcache creation was blocked by privacy settings. (Closed)
Patch Set: updates Created 10 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/renderer_webapplicationcachehost_impl.cc
diff --git a/chrome/renderer/renderer_webapplicationcachehost_impl.cc b/chrome/renderer/renderer_webapplicationcachehost_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..66a71a1ea661293272e7b3b40d0beef4069dc664
--- /dev/null
+++ b/chrome/renderer/renderer_webapplicationcachehost_impl.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2010 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 "chrome/renderer/renderer_webapplicationcachehost_impl.h"
+
+#include "chrome/common/content_settings_types.h"
+#include "chrome/renderer/render_thread.h"
+#include "chrome/renderer/render_view.h"
+
+using appcache::AppCacheBackend;
+using WebKit::WebApplicationCacheHostClient;
+
+RendererWebApplicationCacheHostImpl::RendererWebApplicationCacheHostImpl(
+ RenderView* render_view,
+ WebApplicationCacheHostClient* client,
+ AppCacheBackend* backend)
+ : WebApplicationCacheHostImpl(client, backend),
+ content_blocked_(false),
+ render_view_(render_view) {
+}
+
+RendererWebApplicationCacheHostImpl::~RendererWebApplicationCacheHostImpl() {
+}
+
+void RendererWebApplicationCacheHostImpl::OnContentBlocked() {
+ if (!content_blocked_) {
+ RenderThread::current()->Send(new ViewHostMsg_ContentBlocked(
+ render_view_->routing_id(), CONTENT_SETTINGS_TYPE_COOKIES));
michaeln 2010/04/08 18:17:42 Here's where the raciness i mentioned earlier come
jochen (gone - plz use gerrit) 2010/04/09 15:44:47 Done.
+ content_blocked_ = true;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698