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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 13474015: drive: Fix lifetime model of FileBrowserEventRouter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index 18909be0487378160aab170226079c770b20eef7..e4b7e7c9d46a732a5ac9816aacc67d1d0bbf5dc6 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -565,7 +565,7 @@ class RequestLocalFileSystemFunction::LocalFileSystemCallbackDispatcher {
};
FileBrowserPrivateAPI::FileBrowserPrivateAPI(Profile* profile)
- : event_router_(make_scoped_refptr(new FileBrowserEventRouter(profile))) {
+ : event_router_(new FileBrowserEventRouter(profile)) {
(new FileBrowserHandlerParser)->Register();
ExtensionFunctionRegistry* registry =
@@ -720,7 +720,7 @@ bool FileWatchBrowserFunctionBase::RunImpl() {
}
void FileWatchBrowserFunctionBase::RunFileWatchOperationOnFileThread(
- scoped_refptr<FileBrowserEventRouter> event_router,
+ FileBrowserEventRouter* event_router,
satorux1 2013/04/08 06:34:36 I think this is unsafe, as |event_router| could be
const FileSystemURL& file_url, const std::string& extension_id) {
base::FilePath local_path = file_url.path();
base::FilePath virtual_path = file_url.virtual_path();
@@ -734,14 +734,14 @@ void FileWatchBrowserFunctionBase::RunFileWatchOperationOnFileThread(
}
bool AddFileWatchBrowserFunction::PerformFileWatchOperation(
- scoped_refptr<FileBrowserEventRouter> event_router,
+ FileBrowserEventRouter* event_router,
const base::FilePath& local_path, const base::FilePath& virtual_path,
const std::string& extension_id) {
return event_router->AddFileWatch(local_path, virtual_path, extension_id);
}
bool RemoveFileWatchBrowserFunction::PerformFileWatchOperation(
- scoped_refptr<FileBrowserEventRouter> event_router,
+ FileBrowserEventRouter* event_router,
const base::FilePath& local_path, const base::FilePath& unused,
const std::string& extension_id) {
event_router->RemoveFileWatch(local_path, extension_id);

Powered by Google App Engine
This is Rietveld 408576698