| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 : directory_(directory), dirkernel_(directory->kernel_), name_(name), | 1080 : directory_(directory), dirkernel_(directory->kernel_), name_(name), |
| 1081 source_file_(source_file), line_(line), writer_(writer) { | 1081 source_file_(source_file), line_(line), writer_(writer) { |
| 1082 Lock(); | 1082 Lock(); |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 BaseTransaction::BaseTransaction(Directory* directory) | 1085 BaseTransaction::BaseTransaction(Directory* directory) |
| 1086 : directory_(directory), | 1086 : directory_(directory), |
| 1087 dirkernel_(NULL), | 1087 dirkernel_(NULL), |
| 1088 name_(NULL), | 1088 name_(NULL), |
| 1089 source_file_(NULL), | 1089 source_file_(NULL), |
| 1090 line_(NULL), | 1090 line_(0), |
| 1091 writer_(INVALID) { | 1091 writer_(INVALID) { |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 BaseTransaction::~BaseTransaction() {} | 1094 BaseTransaction::~BaseTransaction() {} |
| 1095 | 1095 |
| 1096 void BaseTransaction::UnlockAndLog(OriginalEntries* originals_arg) { | 1096 void BaseTransaction::UnlockAndLog(OriginalEntries* originals_arg) { |
| 1097 // Triggers the CALCULATE_CHANGES and TRANSACTION_ENDING events while | 1097 // Triggers the CALCULATE_CHANGES and TRANSACTION_ENDING events while |
| 1098 // holding dir_kernel_'s transaction_mutex and changes_channel mutex. | 1098 // holding dir_kernel_'s transaction_mutex and changes_channel mutex. |
| 1099 // Releases all mutexes upon completion. | 1099 // Releases all mutexes upon completion. |
| 1100 if (!NotifyTransactionChangingAndEnding(originals_arg)) { | 1100 if (!NotifyTransactionChangingAndEnding(originals_arg)) { |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 | 1730 |
| 1731 FastDump& operator<<(FastDump& dump, const Blob& blob) { | 1731 FastDump& operator<<(FastDump& dump, const Blob& blob) { |
| 1732 if (blob.empty()) | 1732 if (blob.empty()) |
| 1733 return dump; | 1733 return dump; |
| 1734 string buffer(base::HexEncode(&blob[0], blob.size())); | 1734 string buffer(base::HexEncode(&blob[0], blob.size())); |
| 1735 dump.out_->sputn(buffer.c_str(), buffer.size()); | 1735 dump.out_->sputn(buffer.c_str(), buffer.size()); |
| 1736 return dump; | 1736 return dump; |
| 1737 } | 1737 } |
| 1738 | 1738 |
| 1739 } // namespace syncable | 1739 } // namespace syncable |
| OLD | NEW |