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

Side by Side Diff: chrome/browser/extensions/extension_assets_manager.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extensions/extension_assets_manager.h" 5 #include "chrome/browser/extensions/extension_assets_manager.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "extensions/common/extension.h" 8 #include "extensions/common/extension.h"
9 #include "extensions/common/file_util.h" 9 #include "extensions/common/file_util.h"
10 10
11 #if defined(OS_CHROMEOS) 11 #if defined(OS_CHROMEOS)
12 #include "chrome/browser/extensions/extension_assets_manager_chromeos.h" 12 #include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
13 #endif 13 #endif
14 14
15 namespace extensions { 15 namespace extensions {
16 namespace { 16 namespace {
17 17
18 class ExtensionAssetsManagerImpl : public ExtensionAssetsManager { 18 class ExtensionAssetsManagerImpl : public ExtensionAssetsManager {
19 public: 19 public:
20 static ExtensionAssetsManagerImpl* GetInstance() { 20 static ExtensionAssetsManagerImpl* GetInstance() {
21 return Singleton<ExtensionAssetsManagerImpl>::get(); 21 return Singleton<ExtensionAssetsManagerImpl>::get();
22 } 22 }
23 23
24 // Override from ExtensionAssetsManager. 24 // Override from ExtensionAssetsManager.
25 virtual void InstallExtension(const Extension* extension, 25 virtual void InstallExtension(const Extension* extension,
26 const base::FilePath& unpacked_extension_root, 26 const base::FilePath& unpacked_extension_root,
27 const base::FilePath& local_install_dir, 27 const base::FilePath& local_install_dir,
28 Profile* profile, 28 Profile* profile,
29 InstallExtensionCallback callback) OVERRIDE { 29 InstallExtensionCallback callback) override {
30 callback.Run(file_util::InstallExtension( 30 callback.Run(file_util::InstallExtension(
31 unpacked_extension_root, 31 unpacked_extension_root,
32 extension->id(), 32 extension->id(),
33 extension->VersionString(), 33 extension->VersionString(),
34 local_install_dir)); 34 local_install_dir));
35 } 35 }
36 36
37 virtual void UninstallExtension( 37 virtual void UninstallExtension(
38 const std::string& id, 38 const std::string& id,
39 Profile* profile, 39 Profile* profile,
40 const base::FilePath& local_install_dir, 40 const base::FilePath& local_install_dir,
41 const base::FilePath& extension_root) OVERRIDE { 41 const base::FilePath& extension_root) override {
42 file_util::UninstallExtension(local_install_dir, id); 42 file_util::UninstallExtension(local_install_dir, id);
43 } 43 }
44 44
45 private: 45 private:
46 friend struct DefaultSingletonTraits<ExtensionAssetsManagerImpl>; 46 friend struct DefaultSingletonTraits<ExtensionAssetsManagerImpl>;
47 47
48 ExtensionAssetsManagerImpl() {} 48 ExtensionAssetsManagerImpl() {}
49 virtual ~ExtensionAssetsManagerImpl() {} 49 virtual ~ExtensionAssetsManagerImpl() {}
50 50
51 DISALLOW_COPY_AND_ASSIGN(ExtensionAssetsManagerImpl); 51 DISALLOW_COPY_AND_ASSIGN(ExtensionAssetsManagerImpl);
52 }; 52 };
53 53
54 } // namespace 54 } // namespace
55 55
56 // static 56 // static
57 ExtensionAssetsManager* ExtensionAssetsManager::GetInstance() { 57 ExtensionAssetsManager* ExtensionAssetsManager::GetInstance() {
58 #if defined(OS_CHROMEOS) 58 #if defined(OS_CHROMEOS)
59 return ExtensionAssetsManagerChromeOS::GetInstance(); 59 return ExtensionAssetsManagerChromeOS::GetInstance();
60 #else 60 #else
61 // If not Chrome OS, use trivial implementation that doesn't share anything. 61 // If not Chrome OS, use trivial implementation that doesn't share anything.
62 return ExtensionAssetsManagerImpl::GetInstance(); 62 return ExtensionAssetsManagerImpl::GetInstance();
63 #endif // OS_CHROMEOS 63 #endif // OS_CHROMEOS
64 } 64 }
65 65
66 } // namespace extensions 66 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_apitest.h ('k') | chrome/browser/extensions/extension_assets_manager_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698