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

Side by Side Diff: athena/extensions/test/test_extensions_delegate.cc

Issue 501093003: Consolidate AppControllDelegate to ExtensionsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « athena/extensions/shell/extensions_delegate_impl.cc ('k') | athena/main/athena_main.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 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 "athena/extensions/public/extensions_delegate.h" 5 #include "athena/extensions/public/extensions_delegate.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "extensions/common/extension_set.h" 7 #include "extensions/common/extension_set.h"
8 8
9 namespace athena { 9 namespace athena {
10 namespace { 10 namespace {
11 11
12 class TestExtensionsDelegate : public ExtensionsDelegate { 12 class TestExtensionsDelegate : public ExtensionsDelegate {
13 public: 13 public:
14 TestExtensionsDelegate() {} 14 TestExtensionsDelegate() {}
15 15
16 virtual ~TestExtensionsDelegate() {} 16 virtual ~TestExtensionsDelegate() {}
17 17
18 private: 18 private:
19 // ExtensionsDelegate: 19 // ExtensionsDelegate:
20 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE { 20 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE {
21 return NULL; 21 return NULL;
22 } 22 }
23 virtual const extensions::ExtensionSet& GetInstalledExtensions() OVERRIDE { 23 virtual const extensions::ExtensionSet& GetInstalledExtensions() OVERRIDE {
24 return shell_extensions_; 24 return shell_extensions_;
25 } 25 }
26 virtual void LaunchApp(const std::string& app_id) OVERRIDE {} 26 virtual bool LaunchApp(const std::string& app_id) OVERRIDE { return true; }
27 virtual bool UnloadApp(const std::string& app_id) OVERRIDE { return false; }
27 28
28 extensions::ExtensionSet shell_extensions_; 29 extensions::ExtensionSet shell_extensions_;
29 30
30 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate); 31 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate);
31 }; 32 };
32 33
33 } // namespace 34 } // namespace
34 35
35 // static 36 // static
36 void ExtensionsDelegate::CreateExtensionsDelegateForTest() { 37 void ExtensionsDelegate::CreateExtensionsDelegateForTest() {
37 new TestExtensionsDelegate(); 38 new TestExtensionsDelegate();
38 } 39 }
39 40
40 } // namespace athena 41 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/shell/extensions_delegate_impl.cc ('k') | athena/main/athena_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698