#include "base/run_loop.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h"
-#include "chrome/browser/service/service_process_control.h"
+#include "chrome/browser/service_process/service_process_control.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/cloud_print/cloud_print_proxy_info.h"
MockServiceProcessControl::kServiceStateDisabled, false);
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
- prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(
- MockServiceProcessControl::EnabledUserId()));
+ prefs->SetUserPref(
+ prefs::kCloudPrintEmail,
+ new base::StringValue(MockServiceProcessControl::EnabledUserId()));
service.Initialize();
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
service.Initialize();
service.RefreshStatusFromService();
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
service.Initialize();
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
service.Initialize();
MockServiceProcessControl::kServiceStateDisabled, false);
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
- prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(
- MockServiceProcessControl::EnabledUserId()));
+ prefs->SetUserPref(
+ prefs::kCloudPrintEmail,
+ new base::StringValue(MockServiceProcessControl::EnabledUserId()));
service.Initialize();
EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail));
}
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
service.Initialize();
service.RefreshStatusFromService();
service.GetMockServiceProcessControl()->SetWillBeDisabledExpectations();
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail));
}
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
service.Initialize();
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
service.Initialize();
MockServiceProcessControl::kServiceStateDisabled, false);
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
- prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(
- MockServiceProcessControl::EnabledUserId()));
+ prefs->SetUserPref(
+ prefs::kCloudPrintEmail,
+ new base::StringValue(MockServiceProcessControl::EnabledUserId()));
service.Initialize();
EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail));
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
service.Initialize();
prefs->GetString(prefs::kCloudPrintEmail));
}
-BrowserContextKeyedService* TestCloudPrintProxyServiceFactory(
+KeyedService* TestCloudPrintProxyServiceFactory(
content::BrowserContext* profile) {
TestCloudPrintProxyService* service =
new TestCloudPrintProxyService(static_cast<Profile*>(profile));
TEST_F(CloudPrintProxyPolicyTest, StartupBrowserCreatorWithCommandLine) {
TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
prefs->SetUserPref(prefs::kCloudPrintEmail,
- Value::CreateStringValue(std::string()));
+ new base::StringValue(std::string()));
prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
- Value::CreateBooleanValue(false));
+ new base::FundamentalValue(false));
CloudPrintProxyServiceFactory::GetInstance()->
SetTestingFactory(&profile_, TestCloudPrintProxyServiceFactory);