OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef SYNC_API_SYNC_ERROR_H_ | 5 #ifndef SYNC_API_SYNC_ERROR_H_ |
6 #define SYNC_API_SYNC_ERROR_H_ | 6 #define SYNC_API_SYNC_ERROR_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 bool IsSet() const; | 67 bool IsSet() const; |
68 | 68 |
69 // These must only be called if IsSet() is true. | 69 // These must only be called if IsSet() is true. |
70 const tracked_objects::Location& location() const; | 70 const tracked_objects::Location& location() const; |
71 const std::string& message() const; | 71 const std::string& message() const; |
72 ModelType model_type() const; | 72 ModelType model_type() const; |
73 ErrorType error_type() const; | 73 ErrorType error_type() const; |
74 | 74 |
75 // Returns empty string is IsSet() is false. | 75 // Returns empty string is IsSet() is false. |
76 std::string ToString() const; | 76 std::string ToString() const; |
77 | |
78 static void LogDataLoadFailure(ModelType model_type); | |
Ilya Sherman
2013/11/19 22:49:04
nit: Please document this method, and leave a blan
lipalani1
2013/11/26 23:31:35
Done.
| |
77 private: | 79 private: |
78 // Print error information to log. | 80 // Print error information to log. |
79 void PrintLogError() const; | 81 void PrintLogError() const; |
80 | 82 |
81 // Make a copy of a SyncError. If other.IsSet() == false, this->IsSet() will | 83 // Make a copy of a SyncError. If other.IsSet() == false, this->IsSet() will |
82 // now return false. | 84 // now return false. |
83 void Copy(const SyncError& other); | 85 void Copy(const SyncError& other); |
84 | 86 |
85 // Initialize the local error data with the specified error data. After this | 87 // Initialize the local error data with the specified error data. After this |
86 // is called, IsSet() will return true. | 88 // is called, IsSet() will return true. |
(...skipping 11 matching lines...) Expand all Loading... | |
98 ModelType model_type_; | 100 ModelType model_type_; |
99 ErrorType error_type_; | 101 ErrorType error_type_; |
100 }; | 102 }; |
101 | 103 |
102 // gmock printer helper. | 104 // gmock printer helper. |
103 SYNC_EXPORT void PrintTo(const SyncError& sync_error, std::ostream* os); | 105 SYNC_EXPORT void PrintTo(const SyncError& sync_error, std::ostream* os); |
104 | 106 |
105 } // namespace syncer | 107 } // namespace syncer |
106 | 108 |
107 #endif // SYNC_API_SYNC_ERROR_H_ | 109 #endif // SYNC_API_SYNC_ERROR_H_ |
OLD | NEW |