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

Side by Side Diff: ios/chrome/browser/ui/external_file_remover.h

Issue 2804703002: [ObjC ARC] Converts ios/chrome/browser/ui:ui_internal_arc to ARC. (Closed)
Patch Set: comments Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
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 #ifndef IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_REMOVER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_REMOVER_H_
6 #define IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_REMOVER_H_ 6 #define IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_REMOVER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 28 matching lines...) Expand all
39 // Removes files received from other apps. If |all_files| is true, then 39 // Removes files received from other apps. If |all_files| is true, then
40 // all files including files that may be referenced by tabs through restore 40 // all files including files that may be referenced by tabs through restore
41 // service or history. Otherwise, only the unreferenced files are removed. 41 // service or history. Otherwise, only the unreferenced files are removed.
42 // |callback| is called when the removal finishes. 42 // |callback| is called when the removal finishes.
43 void RemoveFiles(bool all_files, const base::Closure& callback); 43 void RemoveFiles(bool all_files, const base::Closure& callback);
44 // Pointer to the tab restore service in the browser state associated with 44 // Pointer to the tab restore service in the browser state associated with
45 // |bvc_|. 45 // |bvc_|.
46 sessions::TabRestoreService* tabRestoreService_; 46 sessions::TabRestoreService* tabRestoreService_;
47 // BrowserViewController used to get the referenced files. Must outlive this 47 // BrowserViewController used to get the referenced files. Must outlive this
48 // object. 48 // object.
49 BrowserViewController* bvc_; 49 __unsafe_unretained BrowserViewController* bvc_;
50 // Used to ensure |Remove()| is not run when this object is destroyed. 50 // Used to ensure |Remove()| is not run when this object is destroyed.
51 base::WeakPtrFactory<ExternalFileRemover> weak_ptr_factory_; 51 base::WeakPtrFactory<ExternalFileRemover> weak_ptr_factory_;
52 // Loads the |tabRestoreService_| if necessary. Removes all files received 52 // Loads the |tabRestoreService_| if necessary. Removes all files received
53 // from other apps if |all_files| is true. Otherwise, removes the unreferenced 53 // from other apps if |all_files| is true. Otherwise, removes the unreferenced
54 // files only. |callback| is called when the removal finishes. 54 // files only. |callback| is called when the removal finishes.
55 void Remove(bool all_files, const base::Closure& callback); 55 void Remove(bool all_files, const base::Closure& callback);
56 }; 56 };
57 57
58 #endif // IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_REMOVER_H_ 58 #endif // IOS_CHROME_BROWSER_UI_EXTERNAL_FILE_REMOVER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/external_file_controller.mm ('k') | ios/chrome/browser/ui/external_file_remover.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698