OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/metrics/previous_session_info.h" | 5 #include "ios/chrome/browser/metrics/previous_session_info.h" |
6 | 6 |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "components/version_info/version_info.h" | 8 #include "components/version_info/version_info.h" |
| 9 #include "ios/chrome/browser/metrics/previous_session_info_private.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "testing/gtest_mac.h" | 11 #include "testing/gtest_mac.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 // Key in the UserDefaults for a boolean value keeping track of memory warnings. | 15 // Key in the UserDefaults for a boolean value keeping track of memory warnings. |
15 NSString* const kDidSeeMemoryWarningShortlyBeforeTerminating = | 16 NSString* const kDidSeeMemoryWarningShortlyBeforeTerminating = |
16 previous_session_info_constants:: | 17 previous_session_info_constants:: |
17 kDidSeeMemoryWarningShortlyBeforeTerminating; | 18 kDidSeeMemoryWarningShortlyBeforeTerminating; |
18 | 19 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]); | 181 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]); |
181 | 182 |
182 // Call the memory warning flag resetter. | 183 // Call the memory warning flag resetter. |
183 [[PreviousSessionInfo sharedInstance] resetMemoryWarningFlag]; | 184 [[PreviousSessionInfo sharedInstance] resetMemoryWarningFlag]; |
184 | 185 |
185 EXPECT_FALSE( | 186 EXPECT_FALSE( |
186 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]); | 187 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]); |
187 } | 188 } |
188 | 189 |
189 } // namespace | 190 } // namespace |
OLD | NEW |