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

Side by Side Diff: content/worker/shared_worker_permission_client_proxy.cc

Issue 46583005: Send Allow{Database,FileSystem,IndexedDB} sync IPCs directly from worker thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/worker/shared_worker_permission_client_proxy.h"
6
7 #include "content/child/thread_safe_sender.h"
8 #include "content/common/worker_messages.h"
9 #include "third_party/WebKit/public/platform/WebString.h"
10 #include "url/gurl.h"
11
12 namespace content {
13
14 SharedWorkerPermissionClientProxy::SharedWorkerPermissionClientProxy(
15 const GURL& origin_url,
16 int routing_id,
17 ThreadSafeSender* thread_safe_sender)
18 : origin_url_(origin_url),
19 routing_id_(routing_id),
20 thread_safe_sender_(thread_safe_sender) {
21 }
22
23 SharedWorkerPermissionClientProxy::~SharedWorkerPermissionClientProxy() {
24 }
25
26 bool SharedWorkerPermissionClientProxy::allowDatabase(
27 const WebKit::WebString& name,
28 const WebKit::WebString& display_name,
29 unsigned long estimated_size) {
30 bool result = false;
31 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowDatabase(
32 routing_id_, origin_url_, name, display_name,
33 estimated_size, &result));
34 return result;
35 }
36
37 bool SharedWorkerPermissionClientProxy::allowFileSystem() {
38 bool result = false;
39 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowFileSystem(
40 routing_id_, origin_url_, &result));
41 return result;
42 }
43
44 bool SharedWorkerPermissionClientProxy::allowIndexedDB(
45 const WebKit::WebString& name) {
46 bool result = false;
47 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB(
48 routing_id_, origin_url_, name, &result));
49 return result;
50 }
51
52 } // namespace content
OLDNEW
« no previous file with comments | « content/worker/shared_worker_permission_client_proxy.h ('k') | content/worker/websharedworkerclient_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698