| OLD | NEW |
| 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 info_.email = std::string(); | 162 info_.email = std::string(); |
| 163 OnCloudPrintProxyInfo(info_); | 163 OnCloudPrintProxyInfo(info_); |
| 164 return true; | 164 return true; |
| 165 } | 165 } |
| 166 | 166 |
| 167 class TestCloudPrintProxyService : public CloudPrintProxyService { | 167 class TestCloudPrintProxyService : public CloudPrintProxyService { |
| 168 public: | 168 public: |
| 169 explicit TestCloudPrintProxyService(Profile* profile) | 169 explicit TestCloudPrintProxyService(Profile* profile) |
| 170 : CloudPrintProxyService(profile) { } | 170 : CloudPrintProxyService(profile) { } |
| 171 | 171 |
| 172 virtual ServiceProcessControl* GetServiceProcessControl() { | 172 virtual ServiceProcessControl* GetServiceProcessControl() OVERRIDE { |
| 173 return &process_control_; | 173 return &process_control_; |
| 174 } | 174 } |
| 175 MockServiceProcessControl* GetMockServiceProcessControl() { | 175 MockServiceProcessControl* GetMockServiceProcessControl() { |
| 176 return &process_control_; | 176 return &process_control_; |
| 177 } | 177 } |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 MockServiceProcessControl process_control_; | 180 MockServiceProcessControl process_control_; |
| 181 }; | 181 }; |
| 182 | 182 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 442 |
| 443 CloudPrintProxyServiceFactory::GetInstance()-> | 443 CloudPrintProxyServiceFactory::GetInstance()-> |
| 444 SetTestingFactory(&profile_, TestCloudPrintProxyServiceFactory); | 444 SetTestingFactory(&profile_, TestCloudPrintProxyServiceFactory); |
| 445 | 445 |
| 446 CommandLine command_line(CommandLine::NO_PROGRAM); | 446 CommandLine command_line(CommandLine::NO_PROGRAM); |
| 447 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); | 447 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); |
| 448 | 448 |
| 449 EXPECT_FALSE(LaunchBrowser(command_line, &profile_)); | 449 EXPECT_FALSE(LaunchBrowser(command_line, &profile_)); |
| 450 MessageLoop::current()->RunUntilIdle(); | 450 MessageLoop::current()->RunUntilIdle(); |
| 451 } | 451 } |
| OLD | NEW |