Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / printing / cloud_print / cloud_print_proxy_service_unittest.cc
index 66d6b47..0d323bb 100644 (file)
@@ -11,7 +11,7 @@
 #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"
@@ -241,9 +241,9 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabled) {
       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();
 
@@ -258,7 +258,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyEnabled) {
 
   TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
   prefs->SetUserPref(prefs::kCloudPrintEmail,
-                     Value::CreateStringValue(std::string()));
+                     new base::StringValue(std::string()));
 
   service.Initialize();
   service.RefreshStatusFromService();
@@ -275,9 +275,9 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithPolicySetProxyDisabled) {
 
   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();
 
@@ -293,9 +293,9 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithPolicySetProxyEnabled) {
 
   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();
 
@@ -309,16 +309,16 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabledThenSetPolicy) {
       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));
 }
@@ -331,7 +331,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyEnabledThenSetPolicy) {
 
   TestingPrefServiceSyncable* prefs = profile_.GetTestingPrefService();
   prefs->SetUserPref(prefs::kCloudPrintEmail,
-                     Value::CreateStringValue(std::string()));
+                     new base::StringValue(std::string()));
 
   service.Initialize();
   service.RefreshStatusFromService();
@@ -341,7 +341,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyEnabledThenSetPolicy) {
 
   service.GetMockServiceProcessControl()->SetWillBeDisabledExpectations();
   prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
-                        Value::CreateBooleanValue(false));
+                        new base::FundamentalValue(false));
 
   EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail));
 }
@@ -355,9 +355,9 @@ TEST_F(CloudPrintProxyPolicyTest,
 
   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();
 
@@ -376,9 +376,9 @@ TEST_F(CloudPrintProxyPolicyTest,
 
   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();
 
@@ -394,9 +394,9 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabledThenEnable) {
       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));
@@ -418,9 +418,9 @@ TEST_F(CloudPrintProxyPolicyTest,
 
   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();
 
@@ -438,7 +438,7 @@ TEST_F(CloudPrintProxyPolicyTest,
             prefs->GetString(prefs::kCloudPrintEmail));
 }
 
-BrowserContextKeyedService* TestCloudPrintProxyServiceFactory(
+KeyedService* TestCloudPrintProxyServiceFactory(
     content::BrowserContext* profile) {
   TestCloudPrintProxyService* service =
       new TestCloudPrintProxyService(static_cast<Profile*>(profile));
@@ -454,9 +454,9 @@ BrowserContextKeyedService* TestCloudPrintProxyServiceFactory(
 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);