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

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

Issue 9557009: IndexedDB: chrome-side changes for permission check from shared worker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move test to separate CL Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/worker/websharedworkerclient_proxy.h" 5 #include "content/worker/websharedworkerclient_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "content/common/file_system/file_system_dispatcher.h" 10 #include "content/common/file_system/file_system_dispatcher.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 void WebSharedWorkerClientProxy::openFileSystem( 166 void WebSharedWorkerClientProxy::openFileSystem(
167 WebKit::WebFileSystem::Type type, 167 WebKit::WebFileSystem::Type type,
168 long long size, 168 long long size,
169 bool create, 169 bool create,
170 WebKit::WebFileSystemCallbacks* callbacks) { 170 WebKit::WebFileSystemCallbacks* callbacks) {
171 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( 171 ChildThread::current()->file_system_dispatcher()->OpenFileSystem(
172 stub_->url().GetOrigin(), static_cast<fileapi::FileSystemType>(type), 172 stub_->url().GetOrigin(), static_cast<fileapi::FileSystemType>(type),
173 size, create, new WebFileSystemCallbackDispatcher(callbacks)); 173 size, create, new WebFileSystemCallbackDispatcher(callbacks));
174 } 174 }
175 175
176 bool WebSharedWorkerClientProxy::allowIndexedDB(const WebKit::WebString& name) {
177 bool result = false;
178 Send(new WorkerProcessHostMsg_AllowIndexedDB(
179 route_id_, stub_->url().GetOrigin(), name, &result));
180 return result;
181 }
182
176 void WebSharedWorkerClientProxy::dispatchDevToolsMessage( 183 void WebSharedWorkerClientProxy::dispatchDevToolsMessage(
177 const WebString& message) { 184 const WebString& message) {
178 if (devtools_agent_) 185 if (devtools_agent_)
179 devtools_agent_->SendDevToolsMessage(message); 186 devtools_agent_->SendDevToolsMessage(message);
180 } 187 }
181 188
182 void WebSharedWorkerClientProxy::saveDevToolsAgentState( 189 void WebSharedWorkerClientProxy::saveDevToolsAgentState(
183 const WebKit::WebString& state) { 190 const WebKit::WebString& state) {
184 if (devtools_agent_) 191 if (devtools_agent_)
185 devtools_agent_->SaveDevToolsAgentState(state); 192 devtools_agent_->SaveDevToolsAgentState(state);
(...skipping 19 matching lines...) Expand all
205 // process, and avoids the crashed worker infobar from appearing to the new 212 // process, and avoids the crashed worker infobar from appearing to the new
206 // page. It's ok to post several of theese, because the first executed task 213 // page. It's ok to post several of theese, because the first executed task
207 // will exit the message loop and subsequent ones won't be executed. 214 // will exit the message loop and subsequent ones won't be executed.
208 LOG(ERROR) << "About to post a delayed &WebSharedWorkerClientProxy::workerCont extDestroyed"; 215 LOG(ERROR) << "About to post a delayed &WebSharedWorkerClientProxy::workerCont extDestroyed";
209 MessageLoop::current()->PostDelayedTask(FROM_HERE, 216 MessageLoop::current()->PostDelayedTask(FROM_HERE,
210 base::Bind( 217 base::Bind(
211 &WebSharedWorkerClientProxy::workerContextDestroyed, 218 &WebSharedWorkerClientProxy::workerContextDestroyed,
212 weak_factory_.GetWeakPtr()), 219 weak_factory_.GetWeakPtr()),
213 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); 220 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds));
214 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698