| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cloud_print/gcp20/prototype/printer.h" | 5 #include "cloud_print/gcp20/prototype/printer.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
| 22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
| 23 #include "base/strings/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
| 24 #include "cloud_print/gcp20/prototype/command_line_reader.h" | 24 #include "cloud_print/gcp20/prototype/command_line_reader.h" |
| 25 #include "cloud_print/gcp20/prototype/gcp20_switches.h" | 25 #include "cloud_print/gcp20/prototype/gcp20_switches.h" |
| 26 #include "cloud_print/gcp20/prototype/local_settings.h" | 26 #include "cloud_print/gcp20/prototype/local_settings.h" |
| 27 #include "cloud_print/gcp20/prototype/service_parameters.h" | 27 #include "cloud_print/gcp20/prototype/service_parameters.h" |
| 28 #include "cloud_print/gcp20/prototype/special_io.h" | 28 #include "cloud_print/gcp20/prototype/special_io.h" |
| 29 #include "cloud_print/version.h" | 29 #include "cloud_print/version.h" |
| 30 #include "net/base/net_util.h" | 30 #include "net/base/net_util.h" |
| 31 #include "net/base/network_interfaces.h" |
| 31 #include "net/base/url_util.h" | 32 #include "net/base/url_util.h" |
| 32 | 33 |
| 33 const char kPrinterStatePathDefault[] = "printer_state.json"; | 34 const char kPrinterStatePathDefault[] = "printer_state.json"; |
| 34 | 35 |
| 35 namespace { | 36 namespace { |
| 36 | 37 |
| 37 const uint16 kHttpPortDefault = 10101; | 38 const uint16 kHttpPortDefault = 10101; |
| 38 const uint32 kTtlDefault = 60*60; // in seconds | 39 const uint32 kTtlDefault = 60*60; // in seconds |
| 39 | 40 |
| 40 const char kServiceType[] = "_privet._tcp.local"; | 41 const char kServiceType[] = "_privet._tcp.local"; |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 | 957 |
| 957 dns_server_.UpdateMetadata(CreateTxt()); | 958 dns_server_.UpdateMetadata(CreateTxt()); |
| 958 | 959 |
| 959 if (connection_state_ == OFFLINE) { | 960 if (connection_state_ == OFFLINE) { |
| 960 requester_.reset(); | 961 requester_.reset(); |
| 961 xmpp_listener_.reset(); | 962 xmpp_listener_.reset(); |
| 962 } | 963 } |
| 963 | 964 |
| 964 return true; | 965 return true; |
| 965 } | 966 } |
| OLD | NEW |