Chromium Code Reviews| Index: components/copresence/rpc/rpc_handler.cc |
| diff --git a/components/copresence/rpc/rpc_handler.cc b/components/copresence/rpc/rpc_handler.cc |
| index 481c202618ade67464d2960634ed8f970872f4d2..50cd3625d05b9b306f986e490721e2d220eca8e2 100644 |
| --- a/components/copresence/rpc/rpc_handler.cc |
| +++ b/components/copresence/rpc/rpc_handler.cc |
| @@ -11,7 +11,15 @@ |
| #include "base/guid.h" |
| #include "base/logging.h" |
| #include "base/strings/string_util.h" |
| + |
| +// TODO(ckehoe): time.h includes windows.h, which #defines DeviceCapabilities |
| +// to DeviceCapabilitiesW. This breaks the pb.h headers below. For now, |
| +// we fix this with an #undef. |
| #include "base/time/time.h" |
| +#if defined(OS_WIN) |
|
Charlie
2014/08/26 16:37:50
Maybe this should say #if defined(DeviceCapabiliti
rkc
2014/08/26 16:45:14
This seems more apt; self-documents to be a Window
|
| +#undef DeviceCapabilities |
| +#endif |
| + |
| #include "components/copresence/copresence_switches.h" |
| #include "components/copresence/handlers/directive_handler.h" |
| #include "components/copresence/proto/codes.pb.h" |
| @@ -162,8 +170,6 @@ bool ExtractIsAudibleStrategy(const ReportRequest& request) { |
| scoped_ptr<DeviceState> GetDeviceCapabilities(const ReportRequest& request) { |
| scoped_ptr<DeviceState> state(new DeviceState); |
| -// TODO(ckehoe): Currently this code causes a linker error on Windows. |
| -#ifndef OS_WIN |
| TokenTechnology* token_technology = |
| state->mutable_capabilities()->add_token_technology(); |
| token_technology->set_medium(AUDIO_ULTRASOUND_PASSBAND); |
| @@ -176,7 +182,6 @@ scoped_ptr<DeviceState> GetDeviceCapabilities(const ReportRequest& request) { |
| token_technology->add_instruction_type(TRANSMIT); |
| if (config == SCAN_ONLY || config == BROADCAST_AND_SCAN) |
| token_technology->add_instruction_type(RECEIVE); |
| -#endif |
| return state.Pass(); |
| } |