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/chromeos/gdata/gdata_operations.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_operations.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" | 13 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" |
14 #include "chrome/browser/chromeos/gdata/gdata_util.h" | 14 #include "chrome/browser/chromeos/gdata/gdata_util.h" |
15 #include "chrome/common/libxml_utils.h" | |
16 #include "chrome/common/net/gaia/gaia_urls.h" | 15 #include "chrome/common/net/gaia/gaia_urls.h" |
17 #include "chrome/common/net/gaia/google_service_auth_error.h" | 16 #include "chrome/common/net/gaia/google_service_auth_error.h" |
18 #include "chrome/common/net/url_util.h" | 17 #include "chrome/common/net/url_util.h" |
19 #include "net/base/escape.h" | 18 #include "net/base/escape.h" |
20 #include "net/http/http_util.h" | 19 #include "net/http/http_util.h" |
| 20 #include "third_party/libxml/chromium/libxml_utils.h" |
21 | 21 |
22 using content::BrowserThread; | 22 using content::BrowserThread; |
23 using content::URLFetcher; | 23 using content::URLFetcher; |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Used for success ratio histograms. 0 for failure, 1 for success, | 27 // Used for success ratio histograms. 0 for failure, 1 for success, |
28 // 2 for no connection (likely offline). | 28 // 2 for no connection (likely offline). |
29 const int kSuccessRatioHistogramFailure = 0; | 29 const int kSuccessRatioHistogramFailure = 0; |
30 const int kSuccessRatioHistogramSuccess = 1; | 30 const int kSuccessRatioHistogramSuccess = 1; |
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 return true; | 1050 return true; |
1051 } | 1051 } |
1052 | 1052 |
1053 void ResumeUploadOperation::OnURLFetchUploadProgress( | 1053 void ResumeUploadOperation::OnURLFetchUploadProgress( |
1054 const net::URLFetcher* source, int64 current, int64 total) { | 1054 const net::URLFetcher* source, int64 current, int64 total) { |
1055 // Adjust the progress values according to the range currently uploaded. | 1055 // Adjust the progress values according to the range currently uploaded. |
1056 NotifyProgress(params_.start_range + current, params_.content_length); | 1056 NotifyProgress(params_.start_range + current, params_.content_length); |
1057 } | 1057 } |
1058 | 1058 |
1059 } // namespace gdata | 1059 } // namespace gdata |
OLD | NEW |