| Index: components/sync/model/model_error.cc
|
| diff --git a/components/sync/model/model_error.cc b/components/sync/model/model_error.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6ae66101d8ba9a10276d368fba12559882c40165
|
| --- /dev/null
|
| +++ b/components/sync/model/model_error.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/sync/model/model_error.h"
|
| +
|
| +namespace syncer {
|
| +
|
| +ModelError::ModelError() : is_set_(false) {}
|
| +
|
| +ModelError::ModelError(const tracked_objects::Location& location,
|
| + const std::string& message)
|
| + : is_set_(true), location_(location), message_(message) {}
|
| +
|
| +ModelError::~ModelError() = default;
|
| +
|
| +bool ModelError::IsSet() const {
|
| + return is_set_;
|
| +}
|
| +
|
| +const tracked_objects::Location& ModelError::location() const {
|
| + DCHECK(IsSet());
|
| + return location_;
|
| +}
|
| +
|
| +const std::string& ModelError::message() const {
|
| + DCHECK(IsSet());
|
| + return message_;
|
| +}
|
| +
|
| +} // namespace syncer
|
|
|