OLD | NEW |
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 "chrome/browser/sync_file_system/drive_backend/sync_engine.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/drive/drive_api_service.h" | 9 #include "chrome/browser/drive/drive_api_service.h" |
10 #include "chrome/browser/drive/drive_notification_manager.h" | 10 #include "chrome/browser/drive/drive_notification_manager.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return service_state_; | 146 return service_state_; |
147 } | 147 } |
148 | 148 |
149 void SyncEngine::GetOriginStatusMap(OriginStatusMap* status_map) { | 149 void SyncEngine::GetOriginStatusMap(OriginStatusMap* status_map) { |
150 DCHECK(status_map); | 150 DCHECK(status_map); |
151 status_map->clear(); | 151 status_map->clear(); |
152 NOTIMPLEMENTED(); | 152 NOTIMPLEMENTED(); |
153 } | 153 } |
154 | 154 |
155 scoped_ptr<base::ListValue> SyncEngine::DumpFiles(const GURL& origin) { | 155 scoped_ptr<base::ListValue> SyncEngine::DumpFiles(const GURL& origin) { |
156 NOTIMPLEMENTED(); | 156 return metadata_database_->DumpFiles(origin.host()); |
157 return make_scoped_ptr(new base::ListValue()); | |
158 } | 157 } |
159 | 158 |
160 void SyncEngine::SetSyncEnabled(bool enabled) { | 159 void SyncEngine::SetSyncEnabled(bool enabled) { |
161 if (sync_enabled_ == enabled) | 160 if (sync_enabled_ == enabled) |
162 return; | 161 return; |
163 | 162 |
164 RemoteServiceState old_state = GetCurrentState(); | 163 RemoteServiceState old_state = GetCurrentState(); |
165 sync_enabled_ = enabled; | 164 sync_enabled_ = enabled; |
166 if (old_state == GetCurrentState()) | 165 if (old_state == GetCurrentState()) |
167 return; | 166 return; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 util::Log(logging::LOG_INFO, FROM_HERE, | 334 util::Log(logging::LOG_INFO, FROM_HERE, |
336 "Service state changed: %d->%d: %s", | 335 "Service state changed: %d->%d: %s", |
337 old_state, GetCurrentState(), description.c_str()); | 336 old_state, GetCurrentState(), description.c_str()); |
338 FOR_EACH_OBSERVER( | 337 FOR_EACH_OBSERVER( |
339 Observer, service_observers_, | 338 Observer, service_observers_, |
340 OnRemoteServiceStateUpdated(GetCurrentState(), description)); | 339 OnRemoteServiceStateUpdated(GetCurrentState(), description)); |
341 } | 340 } |
342 | 341 |
343 } // namespace drive_backend | 342 } // namespace drive_backend |
344 } // namespace sync_file_system | 343 } // namespace sync_file_system |
OLD | NEW |