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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 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
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/sync_file_system/drive_backend/sync_worker.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_worker.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 private: 54 private:
55 DISALLOW_COPY_AND_ASSIGN(MockSyncTask); 55 DISALLOW_COPY_AND_ASSIGN(MockSyncTask);
56 }; 56 };
57 57
58 class MockExtensionService : public TestExtensionService { 58 class MockExtensionService : public TestExtensionService {
59 public: 59 public:
60 MockExtensionService() {} 60 MockExtensionService() {}
61 ~MockExtensionService() override {} 61 ~MockExtensionService() override {}
62 62
63 const extensions::ExtensionSet* extensions() const override {
64 return &extensions_;
65 }
66
67 void AddExtension(const extensions::Extension* extension) override { 63 void AddExtension(const extensions::Extension* extension) override {
68 extensions_.Insert(make_scoped_refptr(extension)); 64 extensions_.Insert(make_scoped_refptr(extension));
69 } 65 }
70 66
71 const extensions::Extension* GetInstalledExtension( 67 const extensions::Extension* GetInstalledExtension(
72 const std::string& extension_id) const override { 68 const std::string& extension_id) const override {
73 return extensions_.GetByID(extension_id); 69 return extensions_.GetByID(extension_id);
74 } 70 }
75 71
76 bool IsExtensionEnabled(const std::string& extension_id) const override { 72 bool IsExtensionEnabled(const std::string& extension_id) const override {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 base::Bind(&SyncWorkerTest::CheckServiceState, 376 base::Bind(&SyncWorkerTest::CheckServiceState,
381 AsWeakPtr(), 377 AsWeakPtr(),
382 SYNC_STATUS_OK, 378 SYNC_STATUS_OK,
383 REMOTE_SERVICE_OK)); 379 REMOTE_SERVICE_OK));
384 380
385 base::RunLoop().RunUntilIdle(); 381 base::RunLoop().RunUntilIdle();
386 } 382 }
387 383
388 } // namespace drive_backend 384 } // namespace drive_backend
389 } // namespace sync_file_system 385 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_service.cc ('k') | chrome/browser/themes/theme_syncable_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698