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

Side by Side Diff: chrome/browser/chromeos/arc/arc_downloads_watcher_service.h

Issue 2315013003: Revert of arc: Fix thread unsafe behavior of ArcDownloadsWatcherService (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 // InstanceHolder<mojom::FileSystemInstance>::Observer 34 // InstanceHolder<mojom::FileSystemInstance>::Observer
35 void OnInstanceReady() override; 35 void OnInstanceReady() override;
36 void OnInstanceClosed() override; 36 void OnInstanceClosed() override;
37 37
38 private: 38 private:
39 class DownloadsWatcher; 39 class DownloadsWatcher;
40 40
41 void StartWatchingDownloads(); 41 void StartWatchingDownloads();
42 void StopWatchingDownloads(); 42 void StopWatchingDownloads();
43 43
44 void OnDownloadsChanged(mojo::Array<mojo::String> paths); 44 void OnDownloadsChanged(const std::vector<base::FilePath>& paths);
45 45
46 std::unique_ptr<DownloadsWatcher> watcher_; 46 std::unique_ptr<DownloadsWatcher> watcher_;
47 47
48 // Note: This should remain the last member so it'll be destroyed and 48 // Note: This should remain the last member so it'll be destroyed and
49 // invalidate the weak pointers before any other members are destroyed. 49 // invalidate the weak pointers before any other members are destroyed.
50 base::WeakPtrFactory<ArcDownloadsWatcherService> weak_ptr_factory_; 50 base::WeakPtrFactory<ArcDownloadsWatcherService> weak_ptr_factory_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(ArcDownloadsWatcherService); 52 DISALLOW_COPY_AND_ASSIGN(ArcDownloadsWatcherService);
53 }; 53 };
54 54
55 } // namespace arc 55 } // namespace arc
56 56
57 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_ 57 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DOWNLOADS_WATCHER_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698