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

Side by Side Diff: chrome/browser/media_gallery/media_file_system_registry_unittest.cc

Issue 12147002: Add a receiver interface to RemovableStorageNotifications. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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 // MediaFileSystemRegistry unit tests. 5 // MediaFileSystemRegistry unit tests.
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 const FilePath& location, 355 const FilePath& location,
356 bool removable, 356 bool removable,
357 bool media_device); 357 bool media_device);
358 358
359 std::vector<MediaFileSystemInfo> GetAutoAddedGalleries( 359 std::vector<MediaFileSystemInfo> GetAutoAddedGalleries(
360 ProfileState* profile_state); 360 ProfileState* profile_state);
361 361
362 void ProcessAttach(const std::string& id, 362 void ProcessAttach(const std::string& id,
363 const string16& name, 363 const string16& name,
364 const FilePath::StringType& location) { 364 const FilePath::StringType& location) {
365 RemovableStorageNotifications::GetInstance()->ProcessAttach( 365 notifications_.ProcessAttach(id, name, location);
366 id, name, location);
367 } 366 }
368 367
369 void ProcessDetach(const std::string& id) { 368 void ProcessDetach(const std::string& id) {
370 RemovableStorageNotifications::GetInstance()->ProcessDetach(id); 369 notifications_.ProcessDetach(id);
371 } 370 }
372 371
373 protected: 372 protected:
374 virtual void SetUp() OVERRIDE; 373 virtual void SetUp() OVERRIDE;
375 virtual void TearDown() OVERRIDE; 374 virtual void TearDown() OVERRIDE;
376 375
377 private: 376 private:
378 // This makes sure that at least one default gallery exists on the file 377 // This makes sure that at least one default gallery exists on the file
379 // system. 378 // system.
380 EnsureMediaDirectoriesExists media_directories_; 379 EnsureMediaDirectoriesExists media_directories_;
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 ProfileState* profile_state = GetProfileState(0U); 918 ProfileState* profile_state = GetProfileState(0U);
920 SetGalleryPermission(profile_state, 919 SetGalleryPermission(profile_state,
921 profile_state->all_permission_extension(), 920 profile_state->all_permission_extension(),
922 device_id, 921 device_id,
923 true /*has access*/); 922 true /*has access*/);
924 CheckNewGalleryInfo(profile_state, galleries_info, empty_dir(), 923 CheckNewGalleryInfo(profile_state, galleries_info, empty_dir(),
925 false /*removable*/, false /* media device */); 924 false /*removable*/, false /* media device */);
926 } 925 }
927 926
928 } // namespace chrome 927 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698