| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/sync/model/model_error.h" |
| 6 |
| 7 namespace syncer { |
| 8 |
| 9 ModelError::ModelError() : is_set_(false) {} |
| 10 |
| 11 ModelError::ModelError(const tracked_objects::Location& location, |
| 12 const std::string& message) |
| 13 : is_set_(true), location_(location), message_(message) {} |
| 14 |
| 15 ModelError::~ModelError() = default; |
| 16 |
| 17 bool ModelError::IsSet() const { |
| 18 return is_set_; |
| 19 } |
| 20 |
| 21 const tracked_objects::Location& ModelError::location() const { |
| 22 DCHECK(IsSet()); |
| 23 return location_; |
| 24 } |
| 25 |
| 26 const std::string& ModelError::message() const { |
| 27 DCHECK(IsSet()); |
| 28 return message_; |
| 29 } |
| 30 |
| 31 } // namespace syncer |
| OLD | NEW |