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

Side by Side Diff: storage/common/database/database_connections.h

Issue 1120553002: [storage] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Review Nits Created 5 years, 7 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 | « storage/browser/quota/quota_task.cc ('k') | storage/common/database/database_connections.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 (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 #ifndef STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_ 5 #ifndef STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_
6 #define STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_ 6 #define STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "storage/common/storage_common_export.h" 15 #include "storage/common/storage_common_export.h"
16 16
17 namespace base { 17 namespace base {
18 class MessageLoopProxy; 18 class SingleThreadTaskRunner;
19 } 19 }
20 20
21 namespace storage { 21 namespace storage {
22 22
23 class STORAGE_COMMON_EXPORT DatabaseConnections { 23 class STORAGE_COMMON_EXPORT DatabaseConnections {
24 public: 24 public:
25 DatabaseConnections(); 25 DatabaseConnections();
26 ~DatabaseConnections(); 26 ~DatabaseConnections();
27 27
28 bool IsEmpty() const; 28 bool IsEmpty() const;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const base::string16& database_name); 84 const base::string16& database_name);
85 void RemoveOpenConnection(const std::string& origin_identifier, 85 void RemoveOpenConnection(const std::string& origin_identifier,
86 const base::string16& database_name); 86 const base::string16& database_name);
87 private: 87 private:
88 ~DatabaseConnectionsWrapper(); 88 ~DatabaseConnectionsWrapper();
89 friend class base::RefCountedThreadSafe<DatabaseConnectionsWrapper>; 89 friend class base::RefCountedThreadSafe<DatabaseConnectionsWrapper>;
90 90
91 bool waiting_for_dbs_to_close_; 91 bool waiting_for_dbs_to_close_;
92 base::Lock open_connections_lock_; 92 base::Lock open_connections_lock_;
93 DatabaseConnections open_connections_; 93 DatabaseConnections open_connections_;
94 scoped_refptr<base::MessageLoopProxy> main_thread_; 94 scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
95 }; 95 };
96 96
97 } // namespace storage 97 } // namespace storage
98 98
99 #endif // STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_ 99 #endif // STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_task.cc ('k') | storage/common/database/database_connections.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698