| 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 "content/browser/download/file_metadata_linux.h" | 5 #include "content/browser/download/file_metadata_linux.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 7 #include <sys/types.h> | 8 #include <sys/types.h> |
| 8 #include <sys/xattr.h> | 9 #include <sys/xattr.h> |
| 9 | 10 |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 | 17 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 34 SetExtendedFileAttribute(file.value().c_str(), kSourceURLAttrName, | 35 SetExtendedFileAttribute(file.value().c_str(), kSourceURLAttrName, |
| 35 source.spec().c_str(), source.spec().length(), 0); | 36 source.spec().c_str(), source.spec().length(), 0); |
| 36 } | 37 } |
| 37 if (referrer.is_valid()) { | 38 if (referrer.is_valid()) { |
| 38 SetExtendedFileAttribute(file.value().c_str(), kReferrerURLAttrName, | 39 SetExtendedFileAttribute(file.value().c_str(), kReferrerURLAttrName, |
| 39 referrer.spec().c_str(), referrer.spec().length(), 0); | 40 referrer.spec().c_str(), referrer.spec().length(), 0); |
| 40 } | 41 } |
| 41 } | 42 } |
| 42 | 43 |
| 43 } // namespace content | 44 } // namespace content |
| OLD | NEW |