OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/profile_service/profile_app.h" | 5 #include "components/profile_service/profile_app.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "components/filesystem/lock_table.h" | 9 #include "components/filesystem/lock_table.h" |
10 #include "components/leveldb/leveldb_service_impl.h" | 10 #include "components/leveldb/leveldb_service_impl.h" |
11 #include "components/profile_service/profile_service_impl.h" | 11 #include "components/profile_service/profile_service_impl.h" |
12 #include "components/profile_service/user_id_map.h" | 12 #include "components/profile_service/user_id_map.h" |
13 #include "mojo/public/cpp/bindings/callback.h" | 13 #include "mojo/public/cpp/bindings/callback.h" |
14 #include "mojo/shell/public/cpp/connection.h" | 14 #include "services/shell/public/cpp/connection.h" |
15 | 15 |
16 namespace profile { | 16 namespace profile { |
17 | 17 |
18 class ProfileApp::ProfileServiceObjects | 18 class ProfileApp::ProfileServiceObjects |
19 : public base::SupportsWeakPtr<ProfileServiceObjects> { | 19 : public base::SupportsWeakPtr<ProfileServiceObjects> { |
20 public: | 20 public: |
21 // Created on the main thread. | 21 // Created on the main thread. |
22 ProfileServiceObjects(base::FilePath profile_data_dir) | 22 ProfileServiceObjects(base::FilePath profile_data_dir) |
23 : profile_data_dir_(profile_data_dir) {} | 23 : profile_data_dir_(profile_data_dir) {} |
24 | 24 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 void ProfileApp::Create(mojo::Connection* connection, | 118 void ProfileApp::Create(mojo::Connection* connection, |
119 leveldb::LevelDBServiceRequest request) { | 119 leveldb::LevelDBServiceRequest request) { |
120 leveldb_service_runner_->PostTask( | 120 leveldb_service_runner_->PostTask( |
121 FROM_HERE, | 121 FROM_HERE, |
122 base::Bind(&ProfileApp::LevelDBServiceObjects::OnLevelDBServiceRequest, | 122 base::Bind(&ProfileApp::LevelDBServiceObjects::OnLevelDBServiceRequest, |
123 leveldb_objects_->AsWeakPtr(), connection, | 123 leveldb_objects_->AsWeakPtr(), connection, |
124 base::Passed(&request))); | 124 base::Passed(&request))); |
125 } | 125 } |
126 | 126 |
127 } // namespace profile | 127 } // namespace profile |
OLD | NEW |