summaryrefslogtreecommitdiffstats
path: root/chrome/test/base/scoped_browser_locale.h
blob: 0f49b8cc4db46fae359cb9a05880392d44159855 (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
// Copyright 2013 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_TEST_BASE_SCOPED_BROWSER_LOCALE_H_
#define CHROME_TEST_BASE_SCOPED_BROWSER_LOCALE_H_

#include <string>

#include "base/basictypes.h"

// Helper class to temporarily set the locale of the browser process.
class ScopedBrowserLocale {
 public:
  explicit ScopedBrowserLocale(const std::string& new_locale);
  ~ScopedBrowserLocale();

 private:
  const std::string old_locale_;

  DISALLOW_COPY_AND_ASSIGN(ScopedBrowserLocale);
};

#endif  // CHROME_TEST_BASE_SCOPED_BROWSER_LOCALE_H_