Chromium Code Reviews| Index: cloud_print/service/win/cloud_print_service.cc |
| diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc |
| index 55652692f3bd636d8fd5610cc4634ef2343aa4b8..182ff2dc1b42a27f15fb1bb8debaf5b0cf74974f 100644 |
| --- a/cloud_print/service/win/cloud_print_service.cc |
| +++ b/cloud_print/service/win/cloud_print_service.cc |
| @@ -2,7 +2,12 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +// Work around warning in atlbase.h |
| +// https://connect.microsoft.com/VisualStudio/feedback/details/1032199/atlbase-h-gives-warning-c4189-when-compiling-with-atl-no-com-support |
| +#pragma warning(push) |
| +#pragma warning(disable:4189) |
| #include <atlbase.h> |
| +#pragma warning(pop) |
| #include <security.h> |
| #include <iomanip> |
| @@ -334,9 +339,11 @@ class CloudPrintServiceModule |
| std::string contents; |
| ServiceState service_state; |
| + if (!base::ReadFileToString(file, &contents) || |
| + !service_state.FromString(contents)) { |
| + return ReportError(E_FAIL, IDS_ERROR_FAILED_CREATE_CONFIG); |
|
Peter Kasting
2014/11/18 00:41:03
We never checked the value of |is_valid| before.
|
| + } |
| - bool is_valid = base::ReadFileToString(file, &contents) && |
| - service_state.FromString(contents); |
| std::string proxy_id = service_state.proxy_id(); |
| LOG(INFO) << file.value() << ": " << contents; |