1c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Copyright (c) 2009 The Chromium Authors. All rights reserved. 2c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Use of this source code is governed by a BSD-style license that can be 3c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// found in the LICENSE file. 4c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 5dc0f95d653279beabeb9817299e2902918ba123eKristian Monsen#ifndef CHROME_BROWSER_COCOA_FILE_METADATA_H_ 6dc0f95d653279beabeb9817299e2902918ba123eKristian Monsen#define CHROME_BROWSER_COCOA_FILE_METADATA_H_ 73345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick#pragma once 8c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 9c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochclass FilePath; 10c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochclass GURL; 11c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 12c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochnamespace file_metadata { 13c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 14c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Adds origin metadata to the file. 15c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// |source| should be the source URL for the download, and |referrer| should be 16c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// the URL the user initiated the download from. 17c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochvoid AddOriginMetadataToFile(const FilePath& file, const GURL& source, 18c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch const GURL& referrer); 19c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 20c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Adds quarantine metadata to the file, assuming it has already been 21c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// quarantined by the OS. 22c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// |source| should be the source URL for the download, and |referrer| should be 23c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// the URL the user initiated the download from. 24c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochvoid AddQuarantineMetadataToFile(const FilePath& file, const GURL& source, 25c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch const GURL& referrer); 26c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 27c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch} // namespace file_metadata 28c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch 29dc0f95d653279beabeb9817299e2902918ba123eKristian Monsen#endif // CHROME_BROWSER_COCOA_FILE_METADATA_H_ 30