OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 "chrome/browser/sync/sessions/unrecoverable_error_info.h" |
| 6 namespace browser_sync { |
| 7 namespace sessions { |
| 8 UnrecoverableErrorInfo::UnrecoverableErrorInfo() { |
| 9 } |
| 10 |
| 11 UnrecoverableErrorInfo::~UnrecoverableErrorInfo() { |
| 12 } |
| 13 |
| 14 void UnrecoverableErrorInfo::Set( |
| 15 const tracked_objects::Location& location, |
| 16 const std::string& message) { |
| 17 DCHECK(location_.get() == NULL); |
| 18 location_.reset(new tracked_objects::Location(location)); |
| 19 message_ = message; |
| 20 } |
| 21 |
| 22 bool UnrecoverableErrorInfo::IsSet() const { |
| 23 return location_.get() != NULL; |
| 24 } |
| 25 |
| 26 const tracked_objects::Location& UnrecoverableErrorInfo::location() const { |
| 27 DCHECK(IsSet()); |
| 28 return *location_; |
| 29 } |
| 30 |
| 31 const std::string& UnrecoverableErrorInfo::message() const { |
| 32 return message_; |
| 33 } |
| 34 |
| 35 } // namespace sessions |
| 36 } // namespace browser_sync |
OLD | NEW |