Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: ios/chrome/browser/ui/external_file_controller.h

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/error_page_egtest.mm ('k') | ios/chrome/browser/ui/external_file_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/external_file_controller.h
diff --git a/ios/chrome/browser/ui/external_file_controller.h b/ios/chrome/browser/ui/external_file_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..20290bb1bec84450ff5548bbcc260bbe64e3a781
--- /dev/null
+++ b/ios/chrome/browser/ui/external_file_controller.h
@@ -0,0 +1,37 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+#include "base/mac/scoped_nsobject.h"
+#import "ios/chrome/browser/ui/native_content_controller.h"
+
+namespace web {
+class BrowserState;
+}
+
+// Native content controller for presenting external files received from
+// other applications. These files are saved in the
+// <Application_Home>/Documents/Inbox directory by the iOS framework.
+@interface ExternalFileController : NativeContentController
+// Initialize with an |url| of the form "chrome://external-file/<file_name>"
+// where |file_name| is the name of the file received from another application.
+- (instancetype)initWithURL:(const GURL&)URL
+ browserState:(web::BrowserState*)browserState;
+
+// Returns the path in the application sandbox of an external file from the
+// URL received for that file.
++ (NSString*)pathForExternalFileURL:(const GURL&)url;
+
+// Removes all the files in the Inbox directory that are not in
+// |filesToKeep| and that are older than |ageInDays| days.
+// |filesToKeep| may be nil if all files should be removed.
++ (void)removeFilesExcluding:(NSSet*)filesToKeep olderThan:(NSInteger)ageInDays;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_CONTROLLER_H_
« no previous file with comments | « ios/chrome/browser/ui/error_page_egtest.mm ('k') | ios/chrome/browser/ui/external_file_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698