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

Side by Side Diff: chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.cc

Issue 2907493002: ChromeOS: Per-user time zone: refactor tests first. (Closed)
Patch Set: Update after review. Created 3 years, 7 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 "chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.h "
6
7 #include "base/sys_info.h"
8
9 namespace chromeos {
10
11 ScopedSetRunningOnChromeOSForTesting::ScopedSetRunningOnChromeOSForTesting(
xiyuan 2017/05/26 19:14:35 ScopedSetRunningOnChromeOSForTesting and the file
Alexander Alekseev 2017/05/29 17:06:04 Done.
12 const std::string& lsb_release,
13 const base::Time& lsb_release_time) {
14 base::SysInfo::SetChromeOSVersionInfoForTest(lsb_release, lsb_release_time);
xiyuan 2017/05/26 17:14:53 ScopedSetRunningOnChromeOSForTesting is necessary
Alexander Alekseev 2017/05/26 18:06:21 https://en.wikipedia.org/wiki/Environment_variable
xiyuan 2017/05/26 19:14:35 Oops. I messed it up with inherited env from paren
Alexander Alekseev 2017/05/29 17:06:04 I found that this is wrong. If you run unit_tests
xiyuan 2017/05/30 15:39:39 Acknowledged.
15 }
16
17 ScopedSetRunningOnChromeOSForTesting::~ScopedSetRunningOnChromeOSForTesting() {
18 base::SysInfo::SetChromeOSVersionInfoForTest("", base::Time());
xiyuan 2017/05/26 19:14:35 This does not restore to previous values. We shoul
Alexander Alekseev 2017/05/29 17:06:03 Done.
19 }
20
21 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698