summaryrefslogtreecommitdiffstats
path: root/extensions/browser/test_runtime_api_delegate.cc
blob: d9624b5839d79cb94fb6296177b013b58527694b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/browser/test_runtime_api_delegate.h"

#include "extensions/common/api/runtime.h"

namespace extensions {

using api::runtime::PlatformInfo;

TestRuntimeAPIDelegate::TestRuntimeAPIDelegate() {
}

TestRuntimeAPIDelegate::~TestRuntimeAPIDelegate() {
}

void TestRuntimeAPIDelegate::AddUpdateObserver(UpdateObserver* observer) {
}

void TestRuntimeAPIDelegate::RemoveUpdateObserver(UpdateObserver* observer) {
}

base::Version TestRuntimeAPIDelegate::GetPreviousExtensionVersion(
    const Extension* extension) {
  return base::Version();
}

void TestRuntimeAPIDelegate::ReloadExtension(const std::string& extension_id) {
}

bool TestRuntimeAPIDelegate::CheckForUpdates(
    const std::string& extension_id,
    const UpdateCheckCallback& callback) {
  return false;
}

void TestRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {
}

bool TestRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
  // TODO(rockot): This probably isn't right. Maybe this delegate should just
  // support manual PlatformInfo override for tests if necessary.
  info->os = api::runtime::PLATFORM_OS_CROS;
  return true;
}

bool TestRuntimeAPIDelegate::RestartDevice(std::string* error_message) {
  return false;
}

}  // namespace extensions