Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: ui/base/l10n/l10n_util_win.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/l10n/l10n_util_mac.mm ('k') | ui/base/l10n/time_format.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/l10n/l10n_util_win.h" 5 #include "ui/base/l10n/l10n_util_win.h"
6 6
7 #include <windowsx.h> 7 #include <windowsx.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 OverrideLocaleHolder() {} 69 OverrideLocaleHolder() {}
70 const std::vector<std::string>& value() const { return value_; } 70 const std::vector<std::string>& value() const { return value_; }
71 void swap_value(std::vector<std::string>* override_value) { 71 void swap_value(std::vector<std::string>* override_value) {
72 value_.swap(*override_value); 72 value_.swap(*override_value);
73 } 73 }
74 private: 74 private:
75 std::vector<std::string> value_; 75 std::vector<std::string> value_;
76 DISALLOW_COPY_AND_ASSIGN(OverrideLocaleHolder); 76 DISALLOW_COPY_AND_ASSIGN(OverrideLocaleHolder);
77 }; 77 };
78 78
79 base::LazyInstance<OverrideLocaleHolder> override_locale_holder = 79 base::LazyInstance<OverrideLocaleHolder>::DestructorAtExit
80 LAZY_INSTANCE_INITIALIZER; 80 override_locale_holder = LAZY_INSTANCE_INITIALIZER;
81 81
82 } // namespace 82 } // namespace
83 83
84 namespace l10n_util { 84 namespace l10n_util {
85 85
86 int GetExtendedStyles() { 86 int GetExtendedStyles() {
87 return !base::i18n::IsRTL() ? 0 : WS_EX_LAYOUTRTL | WS_EX_RTLREADING; 87 return !base::i18n::IsRTL() ? 0 : WS_EX_LAYOUTRTL | WS_EX_RTLREADING;
88 } 88 }
89 89
90 int GetExtendedTooltipStyles() { 90 int GetExtendedTooltipStyles() {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } else { 196 } else {
197 NOTREACHED() << "Failed to determine the UI language for locale override."; 197 NOTREACHED() << "Failed to determine the UI language for locale override.";
198 } 198 }
199 } 199 }
200 200
201 const std::vector<std::string>& GetLocaleOverrides() { 201 const std::vector<std::string>& GetLocaleOverrides() {
202 return override_locale_holder.Get().value(); 202 return override_locale_holder.Get().value();
203 } 203 }
204 204
205 } // namespace l10n_util 205 } // namespace l10n_util
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util_mac.mm ('k') | ui/base/l10n/time_format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698