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

Side by Side Diff: chrome/browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc

Issue 2518053002: Always delete media galleries FilePathWatchers on the FILE thread. (Closed)
Patch Set: fix build error Created 4 years, 1 month 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 | « chrome/browser/media_galleries/fileapi/picasa_data_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/media_galleries/fileapi/picasa_data_provider.h" 5 #include "chrome/browser/media_galleries/fileapi/picasa_data_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 void SetAlbumMapsForTesting(const AlbumMap& album_map, 152 void SetAlbumMapsForTesting(const AlbumMap& album_map,
153 const AlbumMap& folder_map) { 153 const AlbumMap& folder_map) {
154 album_map_ = album_map; 154 album_map_ = album_map;
155 folder_map_ = folder_map; 155 folder_map_ = folder_map;
156 } 156 }
157 157
158 private: 158 private:
159 void OnTempDirWatchStarted( 159 void OnTempDirWatchStarted(
160 std::unique_ptr<base::FilePathWatcher> temp_dir_watcher) override { 160 MediaFilePathWatcherUniquePtr temp_dir_watcher) override {
161 PicasaDataProvider::OnTempDirWatchStarted(std::move(temp_dir_watcher)); 161 PicasaDataProvider::OnTempDirWatchStarted(std::move(temp_dir_watcher));
162 162
163 file_watch_request_returned_ = true; 163 file_watch_request_returned_ = true;
164 for (std::vector<ReadyCallback>::const_iterator it = 164 for (std::vector<ReadyCallback>::const_iterator it =
165 file_watch_started_callbacks_.begin(); 165 file_watch_started_callbacks_.begin();
166 it != file_watch_started_callbacks_.end(); 166 it != file_watch_started_callbacks_.end();
167 ++it) { 167 ++it) {
168 it->Run(temp_dir_watcher_.get() != NULL); 168 it->Run(temp_dir_watcher_.get() != NULL);
169 } 169 }
170 file_watch_started_callbacks_.clear(); 170 file_watch_started_callbacks_.clear();
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 base::Unretained(this))); 558 base::Unretained(this)));
559 } 559 }
560 }; 560 };
561 561
562 IN_PROC_BROWSER_TEST_F(PicasaDataProviderInvalidateInflightAlbumsIndexerTest, 562 IN_PROC_BROWSER_TEST_F(PicasaDataProviderInvalidateInflightAlbumsIndexerTest,
563 InvalidateInflightAlbumsIndexerTest) { 563 InvalidateInflightAlbumsIndexerTest) {
564 RunTest(); 564 RunTest();
565 } 565 }
566 566
567 } // namespace picasa 567 } // namespace picasa
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/fileapi/picasa_data_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698