| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync/engine_impl/attachments/attachment_uploader_impl.h" | 5 #include "components/sync/engine_impl/attachments/attachment_uploader_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| 11 #include "base/base64url.h" | 11 #include "base/base64url.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/metrics/sparse_histogram.h" | 15 #include "base/metrics/sparse_histogram.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
| 18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/sys_byteorder.h" | 19 #include "base/sys_byteorder.h" |
| 20 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
| 21 #include "components/sync/api/attachments/attachment.h" | 21 #include "components/sync/model/attachments/attachment.h" |
| 22 #include "components/sync/protocol/sync.pb.h" | 22 #include "components/sync/protocol/sync.pb.h" |
| 23 #include "google_apis/gaia/gaia_constants.h" | 23 #include "google_apis/gaia/gaia_constants.h" |
| 24 #include "net/base/load_flags.h" | 24 #include "net/base/load_flags.h" |
| 25 #include "net/http/http_status_code.h" | 25 #include "net/http/http_status_code.h" |
| 26 #include "net/url_request/url_fetcher.h" | 26 #include "net/url_request/url_fetcher.h" |
| 27 #include "net/url_request/url_fetcher_delegate.h" | 27 #include "net/url_request/url_fetcher_delegate.h" |
| 28 #include "net/url_request/url_request_status.h" | 28 #include "net/url_request/url_request_status.h" |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 "%s: %s", kSyncStoreBirthday, encoded_store_birthday.c_str())); | 389 "%s: %s", kSyncStoreBirthday, encoded_store_birthday.c_str())); |
| 390 | 390 |
| 391 // Use field number to pass ModelType because it's stable and we have server | 391 // Use field number to pass ModelType because it's stable and we have server |
| 392 // code to decode it. | 392 // code to decode it. |
| 393 const int field_number = GetSpecificsFieldNumberFromModelType(model_type); | 393 const int field_number = GetSpecificsFieldNumberFromModelType(model_type); |
| 394 fetcher->AddExtraRequestHeader( | 394 fetcher->AddExtraRequestHeader( |
| 395 base::StringPrintf("%s: %d", kSyncDataTypeId, field_number)); | 395 base::StringPrintf("%s: %d", kSyncDataTypeId, field_number)); |
| 396 } | 396 } |
| 397 | 397 |
| 398 } // namespace syncer | 398 } // namespace syncer |
| OLD | NEW |