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

Side by Side Diff: chrome/browser/chromeos/drive/directory_loader_unittest.cc

Issue 623293003: replace OVERRIDE and FINAL with override and final in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run git cl format on echo_dialog_view.h Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/drive/directory_loader.h" 5 #include "chrome/browser/chromeos/drive/directory_loader.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 29 matching lines...) Expand all
40 loader_->RemoveObserver(this); 40 loader_->RemoveObserver(this);
41 } 41 }
42 42
43 const std::set<base::FilePath>& changed_directories() const { 43 const std::set<base::FilePath>& changed_directories() const {
44 return changed_directories_; 44 return changed_directories_;
45 } 45 }
46 void clear_changed_directories() { changed_directories_.clear(); } 46 void clear_changed_directories() { changed_directories_.clear(); }
47 47
48 // ChageListObserver overrides: 48 // ChageListObserver overrides:
49 virtual void OnDirectoryReloaded( 49 virtual void OnDirectoryReloaded(
50 const base::FilePath& directory_path) OVERRIDE { 50 const base::FilePath& directory_path) override {
51 changed_directories_.insert(directory_path); 51 changed_directories_.insert(directory_path);
52 } 52 }
53 53
54 private: 54 private:
55 DirectoryLoader* loader_; 55 DirectoryLoader* loader_;
56 std::set<base::FilePath> changed_directories_; 56 std::set<base::FilePath> changed_directories_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(TestDirectoryLoaderObserver); 58 DISALLOW_COPY_AND_ASSIGN(TestDirectoryLoaderObserver);
59 }; 59 };
60 60
61 void AccumulateReadDirectoryResult(ResourceEntryVector* out_entries, 61 void AccumulateReadDirectoryResult(ResourceEntryVector* out_entries,
62 scoped_ptr<ResourceEntryVector> entries) { 62 scoped_ptr<ResourceEntryVector> entries) {
63 ASSERT_TRUE(entries); 63 ASSERT_TRUE(entries);
64 out_entries->insert(out_entries->end(), entries->begin(), entries->end()); 64 out_entries->insert(out_entries->end(), entries->begin(), entries->end());
65 } 65 }
66 66
67 } // namespace 67 } // namespace
68 68
69 class DirectoryLoaderTest : public testing::Test { 69 class DirectoryLoaderTest : public testing::Test {
70 protected: 70 protected:
71 virtual void SetUp() OVERRIDE { 71 virtual void SetUp() override {
72 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 72 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
73 pref_service_.reset(new TestingPrefServiceSimple); 73 pref_service_.reset(new TestingPrefServiceSimple);
74 test_util::RegisterDrivePrefs(pref_service_->registry()); 74 test_util::RegisterDrivePrefs(pref_service_->registry());
75 75
76 logger_.reset(new EventLogger); 76 logger_.reset(new EventLogger);
77 77
78 drive_service_.reset(new FakeDriveService); 78 drive_service_.reset(new FakeDriveService);
79 ASSERT_TRUE(test_util::SetUpTestEntries(drive_service_.get())); 79 ASSERT_TRUE(test_util::SetUpTestEntries(drive_service_.get()));
80 80
81 scheduler_.reset(new JobScheduler(pref_service_.get(), 81 scheduler_.reset(new JobScheduler(pref_service_.get(),
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 // Unlock the loader, this should resume the pending udpate. 244 // Unlock the loader, this should resume the pending udpate.
245 lock.reset(); 245 lock.reset();
246 base::RunLoop().RunUntilIdle(); 246 base::RunLoop().RunUntilIdle();
247 EXPECT_EQ(1U, observer.changed_directories().count( 247 EXPECT_EQ(1U, observer.changed_directories().count(
248 util::GetDriveMyDriveRootPath())); 248 util::GetDriveMyDriveRootPath()));
249 } 249 }
250 250
251 } // namespace internal 251 } // namespace internal
252 } // namespace drive 252 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_processor_unittest.cc ('k') | chrome/browser/chromeos/drive/download_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698