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

Unified Diff: chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc

Issue 1185593002: Move reusable part of LoginPolicyTestBase into a helper class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@key_perm
Patch Set: Addressed comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc b/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc
index 81bb0564e47e66d28d0839cffd2cc17709d23bfb..570427db0359583cc6bbea552b095dc7520f8bee 100644
--- a/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc
+++ b/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc
@@ -36,7 +36,7 @@ class RestoreOnStartupTestChromeOS : public LoginPolicyTestBase {
// LoginPolicyTestBase:
void SetUpCommandLine(base::CommandLine* command_line) override;
- scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const override;
+ void GetMandatoryPoliciesValue(base::DictionaryValue* policy) const override;
void LogInAndVerifyStartUpURLs();
@@ -53,16 +53,14 @@ void RestoreOnStartupTestChromeOS::SetUpCommandLine(
command_line->AppendSwitch(switches::kDisableChildAccountDetection);
}
-scoped_ptr<base::DictionaryValue>
-RestoreOnStartupTestChromeOS::GetMandatoryPoliciesValue() const {
- scoped_ptr<base::DictionaryValue> policy(new base::DictionaryValue);
+void RestoreOnStartupTestChromeOS::GetMandatoryPoliciesValue(
+ base::DictionaryValue* policy) const {
policy->SetInteger(key::kRestoreOnStartup,
SessionStartupPref::kPrefValueURLs);
scoped_ptr<base::ListValue> urls(new base::ListValue);
urls->AppendString(kStartUpURL1);
urls->AppendString(kStartUpURL2);
policy->Set(key::kRestoreOnStartupURLs, urls.Pass());
- return policy;
}
void RestoreOnStartupTestChromeOS::LogInAndVerifyStartUpURLs() {

Powered by Google App Engine
This is Rietveld 408576698