OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 } | 1226 } |
1227 | 1227 |
1228 sync_api::UserShare* ProfileSyncService::GetUserShare() const { | 1228 sync_api::UserShare* ProfileSyncService::GetUserShare() const { |
1229 if (backend_.get() && backend_initialized_) { | 1229 if (backend_.get() && backend_initialized_) { |
1230 return backend_->GetUserShare(); | 1230 return backend_->GetUserShare(); |
1231 } | 1231 } |
1232 NOTREACHED(); | 1232 NOTREACHED(); |
1233 return NULL; | 1233 return NULL; |
1234 } | 1234 } |
1235 | 1235 |
1236 const browser_sync::sessions::SyncSessionSnapshot* | 1236 browser_sync::sessions::SyncSessionSnapshot |
1237 ProfileSyncService::GetLastSessionSnapshot() const { | 1237 ProfileSyncService::GetLastSessionSnapshot() const { |
1238 if (backend_.get() && backend_initialized_) { | 1238 if (backend_.get() && backend_initialized_) { |
1239 return backend_->GetLastSessionSnapshot(); | 1239 return backend_->GetLastSessionSnapshot(); |
1240 } | 1240 } |
1241 NOTREACHED(); | 1241 NOTREACHED(); |
1242 return NULL; | 1242 return browser_sync::sessions::SyncSessionSnapshot(); |
1243 } | 1243 } |
1244 | 1244 |
1245 bool ProfileSyncService::HasUnsyncedItems() const { | 1245 bool ProfileSyncService::HasUnsyncedItems() const { |
1246 if (backend_.get() && backend_initialized_) { | 1246 if (backend_.get() && backend_initialized_) { |
1247 return backend_->HasUnsyncedItems(); | 1247 return backend_->HasUnsyncedItems(); |
1248 } | 1248 } |
1249 NOTREACHED(); | 1249 NOTREACHED(); |
1250 return false; | 1250 return false; |
1251 } | 1251 } |
1252 | 1252 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1654 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
1655 ProfileSyncService* old_this = this; | 1655 ProfileSyncService* old_this = this; |
1656 this->~ProfileSyncService(); | 1656 this->~ProfileSyncService(); |
1657 new(old_this) ProfileSyncService( | 1657 new(old_this) ProfileSyncService( |
1658 new ProfileSyncComponentsFactoryImpl(profile, | 1658 new ProfileSyncComponentsFactoryImpl(profile, |
1659 CommandLine::ForCurrentProcess()), | 1659 CommandLine::ForCurrentProcess()), |
1660 profile, | 1660 profile, |
1661 signin, | 1661 signin, |
1662 behavior); | 1662 behavior); |
1663 } | 1663 } |
OLD | NEW |