[email protected] | f0e9ac55 | 2014-05-07 14:26:50 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "extensions/browser/test_runtime_api_delegate.h" |
| 6 | |
| 7 | #include "extensions/common/api/runtime.h" |
| 8 | |
| 9 | namespace extensions { |
| 10 | |
| 11 | using core_api::runtime::PlatformInfo; |
| 12 | |
| 13 | TestRuntimeAPIDelegate::TestRuntimeAPIDelegate() { |
| 14 | } |
| 15 | |
| 16 | TestRuntimeAPIDelegate::~TestRuntimeAPIDelegate() { |
| 17 | } |
| 18 | |
| 19 | void TestRuntimeAPIDelegate::AddUpdateObserver(UpdateObserver* observer) { |
| 20 | } |
| 21 | |
| 22 | void TestRuntimeAPIDelegate::RemoveUpdateObserver(UpdateObserver* observer) { |
| 23 | } |
| 24 | |
| 25 | base::Version TestRuntimeAPIDelegate::GetPreviousExtensionVersion( |
| 26 | const Extension* extension) { |
| 27 | return base::Version(); |
| 28 | } |
| 29 | |
| 30 | void TestRuntimeAPIDelegate::ReloadExtension(const std::string& extension_id) { |
| 31 | } |
| 32 | |
| 33 | bool TestRuntimeAPIDelegate::CheckForUpdates( |
| 34 | const std::string& extension_id, |
| 35 | const UpdateCheckCallback& callback) { |
| 36 | return false; |
| 37 | } |
| 38 | |
| 39 | void TestRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { |
| 40 | } |
| 41 | |
| 42 | bool TestRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { |
| 43 | // TODO(rockot): This probably isn't right. Maybe this delegate should just |
| 44 | // support manual PlatformInfo override for tests if necessary. |
| 45 | info->os = PlatformInfo::OS_CROS_; |
| 46 | return true; |
| 47 | } |
| 48 | |
| 49 | bool TestRuntimeAPIDelegate::RestartDevice(std::string* error_message) { |
| 50 | return false; |
| 51 | } |
| 52 | |
| 53 | } // namespace extensions |