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

Side by Side Diff: chrome/common/extensions/chrome_manifest_url_handlers.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/extensions/chrome_manifest_url_handlers.h" 5 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return ManifestURL::Get(extension, keys::kDevToolsPage); 44 return ManifestURL::Get(extension, keys::kDevToolsPage);
45 } 45 }
46 } 46 }
47 47
48 URLOverrides::URLOverrides() { 48 URLOverrides::URLOverrides() {
49 } 49 }
50 50
51 URLOverrides::~URLOverrides() { 51 URLOverrides::~URLOverrides() {
52 } 52 }
53 53
54 static base::LazyInstance<URLOverrides::URLOverrideMap> g_empty_url_overrides = 54 static base::LazyInstance<URLOverrides::URLOverrideMap>::DestructorAtExit
55 LAZY_INSTANCE_INITIALIZER; 55 g_empty_url_overrides = LAZY_INSTANCE_INITIALIZER;
56 56
57 // static 57 // static
58 const URLOverrides::URLOverrideMap& URLOverrides::GetChromeURLOverrides( 58 const URLOverrides::URLOverrideMap& URLOverrides::GetChromeURLOverrides(
59 const Extension* extension) { 59 const Extension* extension) {
60 URLOverrides* url_overrides = static_cast<URLOverrides*>( 60 URLOverrides* url_overrides = static_cast<URLOverrides*>(
61 extension->GetManifestData(keys::kChromeURLOverrides)); 61 extension->GetManifestData(keys::kChromeURLOverrides));
62 return url_overrides ? url_overrides->chrome_url_overrides_ 62 return url_overrides ? url_overrides->chrome_url_overrides_
63 : g_empty_url_overrides.Get(); 63 : g_empty_url_overrides.Get();
64 } 64 }
65 65
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 } 169 }
170 return true; 170 return true;
171 } 171 }
172 172
173 const std::vector<std::string> URLOverridesHandler::Keys() const { 173 const std::vector<std::string> URLOverridesHandler::Keys() const {
174 return SingleKey(keys::kChromeURLOverrides); 174 return SingleKey(keys::kChromeURLOverrides);
175 } 175 }
176 176
177 } // namespace extensions 177 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698