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