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

Side by Side Diff: chrome/browser/profiles/profile_browsertest.cc

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/prefs/pref_service.h"
10 #include "base/version.h" 11 #include "base/version.h"
11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/chrome_version_service.h" 12 #include "chrome/browser/profiles/chrome_version_service.h"
13 #include "chrome/browser/profiles/profile_impl.h" 13 #include "chrome/browser/profiles/profile_impl.h"
14 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/common/chrome_version_info.h" 16 #include "chrome/common/chrome_version_info.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "chrome/test/base/in_process_browser_test.h" 18 #include "chrome/test/base/in_process_browser_test.h"
19 #include "chrome/test/base/ui_test_utils.h" 19 #include "chrome/test/base/ui_test_utils.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Subsequent calls to a non-crash value should be ignored. 219 // Subsequent calls to a non-crash value should be ignored.
220 profile->SetExitType(Profile::EXIT_NORMAL); 220 profile->SetExitType(Profile::EXIT_NORMAL);
221 std::string second_call_value(prefs->GetString(prefs::kSessionExitType)); 221 std::string second_call_value(prefs->GetString(prefs::kSessionExitType));
222 EXPECT_EQ(first_call_value, second_call_value); 222 EXPECT_EQ(first_call_value, second_call_value);
223 223
224 // Setting back to a crashed value should work. 224 // Setting back to a crashed value should work.
225 profile->SetExitType(Profile::EXIT_CRASHED); 225 profile->SetExitType(Profile::EXIT_CRASHED);
226 std::string final_value(prefs->GetString(prefs::kSessionExitType)); 226 std::string final_value(prefs->GetString(prefs::kSessionExitType));
227 EXPECT_EQ(crash_value, final_value); 227 EXPECT_EQ(crash_value, final_value);
228 } 228 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698