1// Copyright 2013 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.
4
5#include "chrome/test/base/scoped_browser_locale.h"
6
7#include "chrome/browser/browser_process.h"
8
9ScopedBrowserLocale::ScopedBrowserLocale(const std::string& new_locale)
10      : old_locale_(g_browser_process->GetApplicationLocale()) {
11  g_browser_process->SetApplicationLocale(new_locale);
12}
13
14ScopedBrowserLocale::~ScopedBrowserLocale() {
15  g_browser_process->SetApplicationLocale(old_locale_);
16}
17