summaryrefslogtreecommitdiffstats
path: root/mojo/runner/scoped_user_data_dir.h
blob: 01d84187664262430d94c1e03485a3294901c529 (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
// Copyright 2015 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 MOJO_RUNNER_SCOPED_USER_DATA_DIR_H_
#define MOJO_RUNNER_SCOPED_USER_DATA_DIR_H_

#include "base/files/scoped_temp_dir.h"

namespace mojo {
namespace runner {

// A scoped class which owns a ScopedTempDir if --use-temporary-user-data-dir
// is set. If it is, also modifies the command line so that --user-data-dir
// points to the temporary dir.
class ScopedUserDataDir {
 public:
  ScopedUserDataDir();
  ~ScopedUserDataDir();

 private:
  base::ScopedTempDir temp_dir_;
};

}  // namespace runner
}  // namespace mojo

#endif  // MOJO_RUNNER_SCOPED_USER_DATA_DIR_H_