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

Side by Side Diff: third_party/leveldatabase/env_chromium.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase 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
« no previous file with comments | « remoting/host/plugin/host_log_handler.cc ('k') | ui/base/l10n/l10n_util_mac.mm » ('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 (c) 2011 The LevelDB Authors. All rights reserved. 1 // Copyright (c) 2011 The LevelDB 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. See the AUTHORS file for names of contributors. 3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 4
5 #include <deque> 5 #include <deque>
6 #include <errno.h> 6 #include <errno.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 mu_.Release(); 539 mu_.Release();
540 (*function)(arg); 540 (*function)(arg);
541 } 541 }
542 } 542 }
543 543
544 void ChromiumEnv::StartThread(void (*function)(void* arg), void* arg) { 544 void ChromiumEnv::StartThread(void (*function)(void* arg), void* arg) {
545 new Thread(function, arg); // Will self-delete. 545 new Thread(function, arg); // Will self-delete.
546 } 546 }
547 547
548 ::base::LazyInstance<ChromiumEnv, ::base::LeakyLazyInstanceTraits<ChromiumEnv> > 548 ::base::LazyInstance<ChromiumEnv, ::base::LeakyLazyInstanceTraits<ChromiumEnv> >
549 default_env(::base::LINKER_INITIALIZED); 549 default_env = LAZY_INSTANCE_INITIALIZER;
550 550
551 } 551 }
552 552
553 Env* Env::Default() { 553 Env* Env::Default() {
554 return default_env.Pointer(); 554 return default_env.Pointer();
555 } 555 }
556 556
557 } 557 }
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_log_handler.cc ('k') | ui/base/l10n/l10n_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698