| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/syncable/syncable.h" | 5 #include "chrome/browser/sync/syncable/syncable.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 for (ExtendedAttributes::const_iterator i = snapshot.dirty_xattrs.begin(); | 623 for (ExtendedAttributes::const_iterator i = snapshot.dirty_xattrs.begin(); |
| 624 i != snapshot.dirty_xattrs.end(); ++i) { | 624 i != snapshot.dirty_xattrs.end(); ++i) { |
| 625 ExtendedAttributeKey key(i->first.metahandle, i->first.key); | 625 ExtendedAttributeKey key(i->first.metahandle, i->first.key); |
| 626 ExtendedAttributes::iterator found = | 626 ExtendedAttributes::iterator found = |
| 627 kernel_->extended_attributes->find(key); | 627 kernel_->extended_attributes->find(key); |
| 628 if (found != kernel_->extended_attributes->end()) | 628 if (found != kernel_->extended_attributes->end()) |
| 629 found->second.dirty = true; | 629 found->second.dirty = true; |
| 630 } | 630 } |
| 631 } | 631 } |
| 632 | 632 |
| 633 int64 Directory::last_sync_timestamp() const { | 633 int64 Directory::last_download_timestamp() const { |
| 634 ScopedKernelLock lock(this); | 634 ScopedKernelLock lock(this); |
| 635 return kernel_->persisted_info.last_sync_timestamp; | 635 return kernel_->persisted_info.last_download_timestamp; |
| 636 } | 636 } |
| 637 | 637 |
| 638 void Directory::set_last_sync_timestamp(int64 timestamp) { | 638 void Directory::set_last_download_timestamp(int64 timestamp) { |
| 639 ScopedKernelLock lock(this); | 639 ScopedKernelLock lock(this); |
| 640 if (kernel_->persisted_info.last_sync_timestamp == timestamp) | 640 if (kernel_->persisted_info.last_download_timestamp == timestamp) |
| 641 return; | 641 return; |
| 642 kernel_->persisted_info.last_sync_timestamp = timestamp; | 642 kernel_->persisted_info.last_download_timestamp = timestamp; |
| 643 kernel_->info_status = KERNEL_SHARE_INFO_DIRTY; | 643 kernel_->info_status = KERNEL_SHARE_INFO_DIRTY; |
| 644 } | 644 } |
| 645 | 645 |
| 646 bool Directory::initial_sync_ended() const { | 646 bool Directory::initial_sync_ended() const { |
| 647 ScopedKernelLock lock(this); | 647 ScopedKernelLock lock(this); |
| 648 return kernel_->persisted_info.initial_sync_ended; | 648 return kernel_->persisted_info.initial_sync_ended; |
| 649 } | 649 } |
| 650 | 650 |
| 651 void Directory::set_initial_sync_ended(bool x) { | 651 void Directory::set_initial_sync_ended(bool x) { |
| 652 ScopedKernelLock lock(this); | 652 ScopedKernelLock lock(this); |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 return s << std::dec; | 1569 return s << std::dec; |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 FastDump& operator<<(FastDump& dump, const syncable::Blob& blob) { | 1572 FastDump& operator<<(FastDump& dump, const syncable::Blob& blob) { |
| 1573 if (blob.empty()) | 1573 if (blob.empty()) |
| 1574 return dump; | 1574 return dump; |
| 1575 string buffer(HexEncode(&blob[0], blob.size())); | 1575 string buffer(HexEncode(&blob[0], blob.size())); |
| 1576 dump.out_->sputn(buffer.c_str(), buffer.size()); | 1576 dump.out_->sputn(buffer.c_str(), buffer.size()); |
| 1577 return dump; | 1577 return dump; |
| 1578 } | 1578 } |
| OLD | NEW |