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

Side by Side Diff: chrome/browser/chromeos/scoped_set_running_on_chromeos_for_testing.h

Issue 2907493002: ChromeOS: Per-user time zone: refactor tests first. (Closed)
Patch Set: Fix debug build Created 3 years, 6 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 #ifndef CHROME_BROWSER_CHROMEOS_SCOPED_SET_RUNNING_ON_CHROMEOS_FOR_TESTING_H_
6 #define CHROME_BROWSER_CHROMEOS_SCOPED_SET_RUNNING_ON_CHROMEOS_FOR_TESTING_H_
7
8 #include <string>
9
10 #include "base/time/time.h"
11
12 namespace chromeos {
13
14 // unit_tests must always reset status of modified global singletons,
15 // otherwise later tests will fail, because they are run in the same process.
16 //
17 // This object resets LSB-Release to empty string on destruction, forcing
18 // is_running_on_chromeos() to return false.
19 class ScopedSetRunningOnChromeOSForTesting {
20 public:
21 ScopedSetRunningOnChromeOSForTesting(const std::string& lsb_release,
22 const base::Time& lsb_release_time);
23 ~ScopedSetRunningOnChromeOSForTesting();
24
25 private:
26 DISALLOW_COPY_AND_ASSIGN(ScopedSetRunningOnChromeOSForTesting);
27 };
28
29 } // namespace chromeos
30
31 #endif // CHROME_BROWSER_CHROMEOS_SCOPED_SET_RUNNING_ON_CHROMEOS_FOR_TESTING_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698