OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #include "base/mac/scoped_nsobject.h" |
| 11 #import "ios/chrome/browser/ui/native_content_controller.h" |
| 12 |
| 13 namespace web { |
| 14 class BrowserState; |
| 15 } |
| 16 |
| 17 // Native content controller for presenting external files received from |
| 18 // other applications. These files are saved in the |
| 19 // <Application_Home>/Documents/Inbox directory by the iOS framework. |
| 20 @interface ExternalFileController : NativeContentController |
| 21 // Initialize with an |url| of the form "chrome://external-file/<file_name>" |
| 22 // where |file_name| is the name of the file received from another application. |
| 23 - (instancetype)initWithURL:(const GURL&)URL |
| 24 browserState:(web::BrowserState*)browserState; |
| 25 |
| 26 // Returns the path in the application sandbox of an external file from the |
| 27 // URL received for that file. |
| 28 + (NSString*)pathForExternalFileURL:(const GURL&)url; |
| 29 |
| 30 // Removes all the files in the Inbox directory that are not in |
| 31 // |filesToKeep| and that are older than |ageInDays| days. |
| 32 // |filesToKeep| may be nil if all files should be removed. |
| 33 + (void)removeFilesExcluding:(NSSet*)filesToKeep olderThan:(NSInteger)ageInDays; |
| 34 |
| 35 @end |
| 36 |
| 37 #endif // IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_CONTROLLER_H_ |
OLD | NEW |