| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/test/scoped_path_override.h" | 5 #include "base/test/scoped_path_override.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 bool is_absolute, | 27 bool is_absolute, |
| 28 bool create) | 28 bool create) |
| 29 : key_(key) { | 29 : key_(key) { |
| 30 bool result = | 30 bool result = |
| 31 PathService::OverrideAndCreateIfNeeded(key, path, is_absolute, create); | 31 PathService::OverrideAndCreateIfNeeded(key, path, is_absolute, create); |
| 32 CHECK(result); | 32 CHECK(result); |
| 33 } | 33 } |
| 34 | 34 |
| 35 ScopedPathOverride::~ScopedPathOverride() { | 35 ScopedPathOverride::~ScopedPathOverride() { |
| 36 bool result = PathService::RemoveOverride(key_); | 36 bool result = PathService::RemoveOverride(key_); |
| 37 CHECK(result) << "The override seems to have been removed already!"; | 37 // The override seems to have been removed already! |
| 38 CHECK(result); |
| 38 } | 39 } |
| 39 | 40 |
| 40 } // namespace base | 41 } // namespace base |
| OLD | NEW |