| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ | |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 | |
| 10 // Constant defines used in the cloud print proxy code | |
| 11 extern const char kProxyIdValue[]; | |
| 12 extern const char kPrinterNameValue[]; | |
| 13 extern const char kPrinterDescValue[]; | |
| 14 extern const char kPrinterCapsValue[]; | |
| 15 extern const char kPrinterDefaultsValue[]; | |
| 16 extern const char kPrinterStatusValue[]; | |
| 17 extern const char kPrinterTagValue[]; | |
| 18 extern const char kPrinterRemoveTagValue[]; | |
| 19 extern const char kMessageTextValue[]; | |
| 20 | |
| 21 // Values in the respone JSON from the cloud print server | |
| 22 extern const char kNameValue[]; | |
| 23 extern const char kIdValue[]; | |
| 24 extern const char kTicketUrlValue[]; | |
| 25 extern const char kFileUrlValue[]; | |
| 26 extern const char kJobListValue[]; | |
| 27 extern const char kTitleValue[]; | |
| 28 extern const char kPrinterCapsHashValue[]; | |
| 29 extern const char kTagsValue[]; | |
| 30 extern const char kXMPPJidValue[]; | |
| 31 extern const char kOAuthCodeValue[]; | |
| 32 | |
| 33 extern const char kProxyTagPrefix[]; | |
| 34 extern const char kTagsHashTagName[]; | |
| 35 extern const char kTagDryRunFlag[]; | |
| 36 extern const char kChromeVersionTagName[]; | |
| 37 extern const char kSystemNameTagName[]; | |
| 38 extern const char kSystemVersionTagName[]; | |
| 39 | |
| 40 extern const char kCloudPrintGaiaServiceId[]; | |
| 41 extern const char kProxyAuthUserAgent[]; | |
| 42 extern const char kCloudPrintPushNotificationsSource[]; | |
| 43 extern const char kCloudPrintUserAgent[]; | |
| 44 extern const char kJobFetchReasonStartup[]; | |
| 45 extern const char kJobFetchReasonPoll[]; | |
| 46 extern const char kJobFetchReasonNotified[]; | |
| 47 extern const char kJobFetchReasonQueryMore[]; | |
| 48 extern const char kPrintSystemFailedMessageId[]; | |
| 49 extern const char kGetPrinterCapsFailedMessageId[]; | |
| 50 extern const char kEnumPrintersFailedMessageId[]; | |
| 51 extern const char kZombiePrinterMessageId[]; | |
| 52 | |
| 53 // Max retry count for job data fetch requests. | |
| 54 const int kJobDataMaxRetryCount = 5; | |
| 55 // Max retry count (infinity) for API fetch requests. | |
| 56 const int kCloudPrintAPIMaxRetryCount = -1; | |
| 57 // Max retry count (infinity) for Registration requests. | |
| 58 const int kCloudPrintRegisterMaxRetryCount = -1; | |
| 59 // Max retry count (infinity) for authentication requests. | |
| 60 const int kCloudPrintAuthMaxRetryCount = -1; | |
| 61 | |
| 62 // When we don't have XMPP notifications available, we resort to polling for | |
| 63 // print jobs. We choose a random interval in seconds between these 2 values. | |
| 64 const int kMinJobPollIntervalSecs = 5*60; // 5 minutes in seconds | |
| 65 const int kMaxJobPollIntervalSecs = 8*60; // 8 minutes in seconds | |
| 66 | |
| 67 // When we have XMPP notifications available, we ping server to keep connection | |
| 68 // alive or check connection status. | |
| 69 const int kDefaultXmppPingTimeoutSecs = 5*60; // 5 minutes in seconds | |
| 70 const int kMinimumXmppPingTimeoutSecs = 2*60; // 2 minutes in seconds | |
| 71 const int kXmppPingCheckIntervalSecs = 60; | |
| 72 | |
| 73 // Number of failed pings before we try to reinstablish XMPP connection. | |
| 74 const int kMaxFailedXmppPings = 2; | |
| 75 | |
| 76 // The number of seconds before the OAuth2 access token is due to expire that | |
| 77 // we try and refresh it. | |
| 78 const int kTokenRefreshGracePeriodSecs = 5*60; // 5 minutes in seconds | |
| 79 | |
| 80 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ | |
| 81 | |
| OLD | NEW |