blob: 868f11bf099601aeb6bc5b3f84a3329282c713e7 [file] [log] [blame]
// 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_CHROME_CLEANER_LOGGING_SCOPED_LOGGING_H_
#define CHROME_CHROME_CLEANER_LOGGING_SCOPED_LOGGING_H_
#include <string>
#include "base/files/file_path.h"
#include "base/macros.h"
namespace chrome_cleaner {
// A utility to print the "Null" string for null wchar_t*.
std::wstring ConvertIfNull(const wchar_t* str);
// Un/Initialize the logging machinery. A |suffix| can be appended to the log
// file name if necessary.
class ScopedLogging {
public:
explicit ScopedLogging(base::FilePath::StringPieceType suffix);
~ScopedLogging();
// Returns the path to the log file for the current process.
static base::FilePath GetLogFilePath(base::FilePath::StringPieceType suffix);
private:
DISALLOW_COPY_AND_ASSIGN(ScopedLogging);
};
} // namespace chrome_cleaner
#endif // CHROME_CHROME_CLEANER_LOGGING_SCOPED_LOGGING_H_