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

Side by Side Diff: extensions/renderer/wake_event_page.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "extensions/renderer/wake_event_page.h" 5 #include "extensions/renderer/wake_event_page.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 11 matching lines...) Expand all
22 #include "extensions/renderer/v8_helpers.h" 22 #include "extensions/renderer/v8_helpers.h"
23 #include "ipc/ipc_message.h" 23 #include "ipc/ipc_message.h"
24 #include "ipc/ipc_message_macros.h" 24 #include "ipc/ipc_message_macros.h"
25 25
26 namespace extensions { 26 namespace extensions {
27 27
28 using namespace v8_helpers; 28 using namespace v8_helpers;
29 29
30 namespace { 30 namespace {
31 31
32 base::LazyInstance<WakeEventPage> g_instance = LAZY_INSTANCE_INITIALIZER; 32 base::LazyInstance<WakeEventPage>::DestructorAtExit g_instance =
33 LAZY_INSTANCE_INITIALIZER;
33 34
34 } // namespace 35 } // namespace
35 36
36 class WakeEventPage::WakeEventPageNativeHandler 37 class WakeEventPage::WakeEventPageNativeHandler
37 : public ObjectBackedNativeHandler { 38 : public ObjectBackedNativeHandler {
38 public: 39 public:
39 // Handles own lifetime. 40 // Handles own lifetime.
40 WakeEventPageNativeHandler(ScriptContext* context, 41 WakeEventPageNativeHandler(ScriptContext* context,
41 const std::string& name, 42 const std::string& name,
42 const MakeRequestCallback& make_request) 43 const MakeRequestCallback& make_request)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // call immediately. 194 // call immediately.
194 request_data->on_response.Run(success); 195 request_data->on_response.Run(success);
195 } else { 196 } else {
196 content::WorkerThread::PostTask( 197 content::WorkerThread::PostTask(
197 request_data->thread_id, 198 request_data->thread_id,
198 base::Bind(request_data->on_response, success)); 199 base::Bind(request_data->on_response, success));
199 } 200 }
200 } 201 }
201 202
202 } // namespace extensions 203 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/user_script_injector.cc ('k') | extensions/renderer/worker_thread_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698