Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: components/sync/model/model_error.cc

Issue 2618483003: [Sync] Introduce ModelError for USS error handling. (Closed)
Patch Set: Address comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « components/sync/model/model_error.h ('k') | components/sync/model/model_type_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698