Add ICU message format support
[chromium-blink-merge.git] / chromecast / crash / linux / dummy_minidump_generator.h
blob5eabca8039bf704d070889518b4f4f6dbd5f2372
1 // Copyright 2015 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.
5 #ifndef CHROMECAST_CRASH_LINUX_DUMMY_MINIDUMP_GENERATOR_H_
6 #define CHROMECAST_CRASH_LINUX_DUMMY_MINIDUMP_GENERATOR_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "chromecast/crash/linux/minidump_generator.h"
13 namespace chromecast {
15 class DummyMinidumpGenerator : public MinidumpGenerator {
16 public:
17 // A dummy minidump generator to move an existing minidump into
18 // crash_uploader's monitoring path ($HOME/minidumps). The path is monitored
19 // with file lock-control, so that third process should not write to it
20 // directly.
21 explicit DummyMinidumpGenerator(const std::string& existing_minidump_path);
23 // MinidumpGenerator implementation:
24 // Moves the minidump located at |existing_minidump_path_| to |minidump_path|.
25 // Returns true if successful, false otherwise. Note that this function MUST
26 // be called on a thread without IO restrictions, or it will fail fatally.
27 bool Generate(const std::string& minidump_path) override;
29 private:
30 const std::string existing_minidump_path_;
32 DISALLOW_COPY_AND_ASSIGN(DummyMinidumpGenerator);
35 } // namespace chromecast
37 #endif // CHROMECAST_CRASH_LINUX_DUMMY_MINIDUMP_GENERATOR_H_