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

Side by Side Diff: chrome/test/base/testing_profile_manager.h

Issue 18153007: Add policies to control power management on the Chrome OS login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct example in policy_templates.json. Created 7 years, 5 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/chrome_tests_unit.gypi ('k') | chrome/test/base/testing_profile_manager.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 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h"
12 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "chrome/test/base/scoped_testing_local_state.h" 16 #include "chrome/test/base/scoped_testing_local_state.h"
16 17
17 class PrefServiceSyncable; 18 class PrefServiceSyncable;
18 class ProfileInfoCache; 19 class ProfileInfoCache;
19 class ProfileManager; 20 class ProfileManager;
20 class TestingBrowserProcess; 21 class TestingBrowserProcess;
21 class TestingProfile; 22 class TestingProfile;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void DeleteTestingProfile(const std::string& profile_name); 59 void DeleteTestingProfile(const std::string& profile_name);
59 60
60 // Deletes the cache instance. This is useful for testing that the cache is 61 // Deletes the cache instance. This is useful for testing that the cache is
61 // properly persisting data. 62 // properly persisting data.
62 void DeleteProfileInfoCache(); 63 void DeleteProfileInfoCache();
63 64
64 // Sets ProfileManager's logged_in state. This is only useful on ChromeOS. 65 // Sets ProfileManager's logged_in state. This is only useful on ChromeOS.
65 void SetLoggedIn(bool logged_in); 66 void SetLoggedIn(bool logged_in);
66 67
67 // Helper accessors. 68 // Helper accessors.
69 const base::FilePath& profiles_dir();
68 ProfileManager* profile_manager(); 70 ProfileManager* profile_manager();
69 ProfileInfoCache* profile_info_cache(); 71 ProfileInfoCache* profile_info_cache();
70 72
71 private: 73 private:
72 typedef std::map<std::string, TestingProfile*> TestingProfilesMap; 74 typedef std::map<std::string, TestingProfile*> TestingProfilesMap;
73 75
74 // Does the actual ASSERT-checked SetUp work. This function cannot have a 76 // Does the actual ASSERT-checked SetUp work. This function cannot have a
75 // return value, so it sets the |called_set_up_| flag on success and that is 77 // return value, so it sets the |called_set_up_| flag on success and that is
76 // returned in the public SetUp. 78 // returned in the public SetUp.
77 void SetUpInternal(); 79 void SetUpInternal();
(...skipping 13 matching lines...) Expand all
91 // Weak reference to the profile manager. 93 // Weak reference to the profile manager.
92 ProfileManager* profile_manager_; 94 ProfileManager* profile_manager_;
93 95
94 // Map of profile_name to TestingProfile* from CreateTestingProfile(). 96 // Map of profile_name to TestingProfile* from CreateTestingProfile().
95 TestingProfilesMap testing_profiles_; 97 TestingProfilesMap testing_profiles_;
96 98
97 DISALLOW_COPY_AND_ASSIGN(TestingProfileManager); 99 DISALLOW_COPY_AND_ASSIGN(TestingProfileManager);
98 }; 100 };
99 101
100 #endif // CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ 102 #endif // CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/test/base/testing_profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698