blob: 2c424dcc2f25e5680382d95740305c5ba732e97d (
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
|
// Copyright 2018 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.
#ifndef CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_WIN_H_
#define CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_WIN_H_
#include <string>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/webui/version_handler.h"
// VersionHandlerWindows is responsible for loading the Windows OS version.
class VersionHandlerWindows : public VersionHandler {
public:
VersionHandlerWindows();
~VersionHandlerWindows() override;
// VersionHandler overrides:
void HandleRequestVersionInfo(const base::ListValue* args) override;
// Callbacks from windows::VersionLoader.
void OnVersion(const std::string& version);
// Expose the |FullWindowsVersion| defined in the .cc file for testing.
static std::string GetFullWindowsVersionForTesting();
private:
base::WeakPtrFactory<VersionHandlerWindows> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(VersionHandlerWindows);
};
#endif // CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_WIN_H_
|