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

Side by Side Diff: chrome/browser/chromeos/policy/user_policy_test_helper.h

Issue 1737453003: Revert of Reland: No longer start up profile if there was an error fetching policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // profile. Alternatively, a login can be simulated, which makes it 42 // profile. Alternatively, a login can be simulated, which makes it
43 // unnecessary to call this function. 43 // unnecessary to call this function.
44 void WaitForInitialPolicy(Profile* profile); 44 void WaitForInitialPolicy(Profile* profile);
45 45
46 // Update the policy test server with the given policy. Then refresh and wait 46 // Update the policy test server with the given policy. Then refresh and wait
47 // for the new policy being applied to |profile|. 47 // for the new policy being applied to |profile|.
48 void UpdatePolicy(const base::DictionaryValue& mandatory_policy, 48 void UpdatePolicy(const base::DictionaryValue& mandatory_policy,
49 const base::DictionaryValue& recommended_policy, 49 const base::DictionaryValue& recommended_policy,
50 Profile* profile); 50 Profile* profile);
51 51
52 void DeletePolicyFile();
53
54 private: 52 private:
55 void WritePolicyFile(const base::DictionaryValue& mandatory, 53 void WritePolicyFile(const base::DictionaryValue& mandatory,
56 const base::DictionaryValue& recommended); 54 const base::DictionaryValue& recommended);
57 base::FilePath PolicyFilePath() const; 55 base::FilePath PolicyFilePath() const;
58 56
59 const std::string account_id_; 57 const std::string account_id_;
60 base::ScopedTempDir temp_dir_; 58 base::ScopedTempDir temp_dir_;
61 scoped_ptr<LocalPolicyTestServer> test_server_; 59 scoped_ptr<LocalPolicyTestServer> test_server_;
62 60
63 DISALLOW_COPY_AND_ASSIGN(UserPolicyTestHelper); 61 DISALLOW_COPY_AND_ASSIGN(UserPolicyTestHelper);
64 }; 62 };
65 63
66 } // namespace policy 64 } // namespace policy
67 65
68 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_ 66 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_POLICY_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698