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

Side by Side Diff: ui/keyboard/content/keyboard_content_util.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/gl/gl_surface.cc ('k') | ui/keyboard/keyboard_util.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/keyboard/content/keyboard_content_util.h" 5 #include "ui/keyboard/content/keyboard_content_util.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/keyboard/grit/keyboard_resources.h" 9 #include "ui/keyboard/grit/keyboard_resources.h"
10 #include "ui/keyboard/grit/keyboard_resources_map.h" 10 #include "ui/keyboard/grit/keyboard_resources_map.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 namespace keyboard { 13 namespace keyboard {
14 namespace { 14 namespace {
15 15
16 base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER; 16 base::LazyInstance<GURL>::DestructorAtExit g_override_content_url =
17 LAZY_INSTANCE_INITIALIZER;
17 18
18 } // namespace 19 } // namespace
19 20
20 void SetOverrideContentUrl(const GURL& url) { 21 void SetOverrideContentUrl(const GURL& url) {
21 g_override_content_url.Get() = url; 22 g_override_content_url.Get() = url;
22 } 23 }
23 24
24 const GURL& GetOverrideContentUrl() { 25 const GURL& GetOverrideContentUrl() {
25 return g_override_content_url.Get(); 26 return g_override_content_url.Get();
26 } 27 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 {"keyboard/sounds/keypress-spacebar.wav", 101 {"keyboard/sounds/keypress-spacebar.wav",
101 IDR_KEYBOARD_SOUNDS_KEYPRESS_SPACEBAR}, 102 IDR_KEYBOARD_SOUNDS_KEYPRESS_SPACEBAR},
102 {"keyboard/sounds/keypress-standard.wav", 103 {"keyboard/sounds/keypress-standard.wav",
103 IDR_KEYBOARD_SOUNDS_KEYPRESS_STANDARD}, 104 IDR_KEYBOARD_SOUNDS_KEYPRESS_STANDARD},
104 }; 105 };
105 *size = arraysize(kKeyboardResources); 106 *size = arraysize(kKeyboardResources);
106 return kKeyboardResources; 107 return kKeyboardResources;
107 } 108 }
108 109
109 } // namespace keyboard 110 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/keyboard/keyboard_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698