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

Side by Side Diff: components/nacl/browser/pnacl_host.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 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 "components/nacl/browser/pnacl_host.h" 5 #include "components/nacl/browser/pnacl_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 weak_factory_(this) {} 77 weak_factory_(this) {}
78 78
79 PnaclHost::~PnaclHost() { 79 PnaclHost::~PnaclHost() {
80 // When PnaclHost is destroyed, it's too late to post anything to the cache 80 // When PnaclHost is destroyed, it's too late to post anything to the cache
81 // thread (it will hang shutdown). So just leak the cache backend. 81 // thread (it will hang shutdown). So just leak the cache backend.
82 pnacl::PnaclTranslationCache* cache = disk_cache_.release(); 82 pnacl::PnaclTranslationCache* cache = disk_cache_.release();
83 (void)cache; 83 (void)cache;
84 } 84 }
85 85
86 PnaclHost* PnaclHost::GetInstance() { 86 PnaclHost* PnaclHost::GetInstance() {
87 return Singleton<PnaclHost>::get(); 87 return base::Singleton<PnaclHost>::get();
88 } 88 }
89 89
90 PnaclHost::PendingTranslation::PendingTranslation() 90 PnaclHost::PendingTranslation::PendingTranslation()
91 : process_handle(base::kNullProcessHandle), 91 : process_handle(base::kNullProcessHandle),
92 render_view_id(0), 92 render_view_id(0),
93 nexe_fd(NULL), 93 nexe_fd(NULL),
94 got_nexe_fd(false), 94 got_nexe_fd(false),
95 got_cache_reply(false), 95 got_cache_reply(false),
96 got_cache_hit(false), 96 got_cache_hit(false),
97 is_incognito(false), 97 is_incognito(false),
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 DCHECK(pending_backend_operations_ >= 0); 686 DCHECK(pending_backend_operations_ >= 0);
687 if (pending_translations_.empty() && 687 if (pending_translations_.empty() &&
688 pending_backend_operations_ <= 0 && 688 pending_backend_operations_ <= 0 &&
689 cache_state_ == CacheReady) { 689 cache_state_ == CacheReady) {
690 cache_state_ = CacheUninitialized; 690 cache_state_ = CacheUninitialized;
691 disk_cache_.reset(); 691 disk_cache_.reset();
692 } 692 }
693 } 693 }
694 694
695 } // namespace pnacl 695 } // namespace pnacl
OLDNEW
« no previous file with comments | « components/nacl/browser/pnacl_host.h ('k') | components/omnibox/browser/omnibox_event_global_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698