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 "chrome/browser/chrome_to_mobile_service.h" | 5 #include "chrome/browser/chrome_to_mobile_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/guid.h" | 10 #include "base/guid.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "content/public/browser/notification_source.h" | 39 #include "content/public/browser/notification_source.h" |
40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
41 #include "net/base/escape.h" | 41 #include "net/base/escape.h" |
42 #include "net/base/load_flags.h" | 42 #include "net/base/load_flags.h" |
43 #include "net/url_request/url_fetcher.h" | 43 #include "net/url_request/url_fetcher.h" |
44 #include "net/url_request/url_request_context_getter.h" | 44 #include "net/url_request/url_request_context_getter.h" |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 // The default enabled/disabled state of the Chrome To Mobile feature. | 48 // The default enabled/disabled state of the Chrome To Mobile feature. |
49 const bool kChromeToMobileEnabled = false; | 49 const bool kChromeToMobileEnabled = true; |
50 | 50 |
51 // The maximum number of retries for the URLFetcher requests. | 51 // The maximum number of retries for the URLFetcher requests. |
52 const size_t kMaxRetries = 1; | 52 const size_t kMaxRetries = 1; |
53 | 53 |
54 // The number of hours to delay before retrying authentication on failure. | 54 // The number of hours to delay before retrying authentication on failure. |
55 const size_t kAuthRetryDelayHours = 6; | 55 const size_t kAuthRetryDelayHours = 6; |
56 | 56 |
57 // The number of hours before subsequent search requests are allowed. | 57 // The number of hours before subsequent search requests are allowed. |
58 // This value is used to throttle expensive cloud print search requests. | 58 // This value is used to throttle expensive cloud print search requests. |
59 // Note that this limitation does not hold across application restarts. | 59 // Note that this limitation does not hold across application restarts. |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 586 |
587 // Ensure a second response is not sent after reporting failure below. | 587 // Ensure a second response is not sent after reporting failure below. |
588 request_observer_map_.erase(other); | 588 request_observer_map_.erase(other); |
589 break; | 589 break; |
590 } | 590 } |
591 } | 591 } |
592 | 592 |
593 LogMetric(success ? SEND_SUCCESS : SEND_ERROR); | 593 LogMetric(success ? SEND_SUCCESS : SEND_ERROR); |
594 observer->OnSendComplete(success); | 594 observer->OnSendComplete(success); |
595 } | 595 } |
OLD | NEW |