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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_key_utility_client.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/in_process_webkit/indexed_db_key_utility_client.h" 5 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "content/browser/utility_process_host.h" 10 #include "content/browser/utility_process_host.h"
11 #include "content/common/indexed_db_key.h" 11 #include "content/common/indexed_db_key.h"
12 #include "content/common/indexed_db_messages.h" 12 #include "content/common/indexed_db_messages.h"
13 #include "content/common/utility_messages.h" 13 #include "content/common/utility_messages.h"
14 #include "content/public/common/serialized_script_value.h" 14 #include "content/public/common/serialized_script_value.h"
15 15
16 using content::BrowserThread;
17
16 // This class is used to obtain IndexedDBKeys from SerializedScriptValues 18 // This class is used to obtain IndexedDBKeys from SerializedScriptValues
17 // given an IDBKeyPath. It uses UtilityProcess to do this inside a sandbox 19 // given an IDBKeyPath. It uses UtilityProcess to do this inside a sandbox
18 // (a V8 lock is required there). At this level, all methods are synchronous 20 // (a V8 lock is required there). At this level, all methods are synchronous
19 // as required by the caller. The public API is used on WEBKIT thread, 21 // as required by the caller. The public API is used on WEBKIT thread,
20 // but internally it moves around to UI and IO as needed. 22 // but internally it moves around to UI and IO as needed.
21 class KeyUtilityClientImpl 23 class KeyUtilityClientImpl
22 : public base::RefCountedThreadSafe<KeyUtilityClientImpl> { 24 : public base::RefCountedThreadSafe<KeyUtilityClientImpl> {
23 public: 25 public:
24 KeyUtilityClientImpl(); 26 KeyUtilityClientImpl();
25 27
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 void KeyUtilityClientImpl::Client::OnInjectIDBKeyFinished( 386 void KeyUtilityClientImpl::Client::OnInjectIDBKeyFinished(
385 const content::SerializedScriptValue& value) { 387 const content::SerializedScriptValue& value) {
386 parent_->SetValueAfterInjection(value); 388 parent_->SetValueAfterInjection(value);
387 parent_->FinishInjectingKey(); 389 parent_->FinishInjectingKey();
388 } 390 }
389 391
390 void KeyUtilityClientImpl::Client::OnIDBKeysFromValuesAndKeyPathFailed( 392 void KeyUtilityClientImpl::Client::OnIDBKeysFromValuesAndKeyPathFailed(
391 int id) { 393 int id) {
392 parent_->FinishCreatingKeys(); 394 parent_->FinishCreatingKeys();
393 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698