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

Side by Side Diff: content/child/fileapi/webfilesystem_impl.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 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
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/child/indexed_db/indexed_db_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/child/fileapi/webfilesystem_impl.h" 5 #include "content/child/fileapi/webfilesystem_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <tuple> 8 #include <tuple>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 base::Lock lock_; 76 base::Lock lock_;
77 base::WaitableEvent results_available_event_; 77 base::WaitableEvent results_available_event_;
78 std::vector<base::Closure> results_closures_; 78 std::vector<base::Closure> results_closures_;
79 DISALLOW_COPY_AND_ASSIGN(WaitableCallbackResults); 79 DISALLOW_COPY_AND_ASSIGN(WaitableCallbackResults);
80 }; 80 };
81 81
82 namespace { 82 namespace {
83 83
84 typedef WebFileSystemImpl::WaitableCallbackResults WaitableCallbackResults; 84 typedef WebFileSystemImpl::WaitableCallbackResults WaitableCallbackResults;
85 85
86 base::LazyInstance<base::ThreadLocalPointer<WebFileSystemImpl> >::Leaky 86 base::LazyInstance<base::ThreadLocalPointer<WebFileSystemImpl>>::Leaky
87 g_webfilesystem_tls = LAZY_INSTANCE_INITIALIZER; 87 g_webfilesystem_tls = LAZY_INSTANCE_INITIALIZER;
88 88
89 void DidReceiveSnapshotFile(int request_id) { 89 void DidReceiveSnapshotFile(int request_id) {
90 if (ChildThreadImpl::current()) 90 if (ChildThreadImpl::current())
91 ChildThreadImpl::current()->Send( 91 ChildThreadImpl::current()->Send(
92 new FileSystemHostMsg_DidReceiveSnapshotFile(request_id)); 92 new FileSystemHostMsg_DidReceiveSnapshotFile(request_id));
93 } 93 }
94 94
95 template <typename Method, typename Params> 95 template <typename Method, typename Params>
96 void CallDispatcherOnMainThread( 96 void CallDispatcherOnMainThread(
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 WaitableCallbackResults* WebFileSystemImpl::MaybeCreateWaitableResults( 692 WaitableCallbackResults* WebFileSystemImpl::MaybeCreateWaitableResults(
693 const WebFileSystemCallbacks& callbacks, int callbacks_id) { 693 const WebFileSystemCallbacks& callbacks, int callbacks_id) {
694 if (!callbacks.shouldBlockUntilCompletion()) 694 if (!callbacks.shouldBlockUntilCompletion())
695 return NULL; 695 return NULL;
696 WaitableCallbackResults* results = new WaitableCallbackResults(); 696 WaitableCallbackResults* results = new WaitableCallbackResults();
697 waitable_results_[callbacks_id] = results; 697 waitable_results_[callbacks_id] = results;
698 return results; 698 return results;
699 } 699 }
700 700
701 } // namespace content 701 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/child/indexed_db/indexed_db_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698