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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 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 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 static_assert(static_cast<int>(a) == static_cast<int>(b), \ 344 static_assert(static_cast<int>(a) == static_cast<int>(b), \
345 "mismatching enums: " #a) 345 "mismatching enums: " #a)
346 346
347 namespace content { 347 namespace content {
348 348
349 namespace { 349 namespace {
350 350
351 const int kExtraCharsBeforeAndAfterSelection = 100; 351 const int kExtraCharsBeforeAndAfterSelection = 100;
352 352
353 typedef std::map<int, RenderFrameImpl*> RoutingIDFrameMap; 353 typedef std::map<int, RenderFrameImpl*> RoutingIDFrameMap;
354 static base::LazyInstance<RoutingIDFrameMap> g_routing_id_frame_map = 354 static base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit
355 LAZY_INSTANCE_INITIALIZER; 355 g_routing_id_frame_map = LAZY_INSTANCE_INITIALIZER;
356 356
357 typedef std::map<blink::WebFrame*, RenderFrameImpl*> FrameMap; 357 typedef std::map<blink::WebFrame*, RenderFrameImpl*> FrameMap;
358 base::LazyInstance<FrameMap> g_frame_map = LAZY_INSTANCE_INITIALIZER; 358 base::LazyInstance<FrameMap>::DestructorAtExit g_frame_map =
359 LAZY_INSTANCE_INITIALIZER;
359 360
360 int64_t ExtractPostId(const WebHistoryItem& item) { 361 int64_t ExtractPostId(const WebHistoryItem& item) {
361 if (item.isNull() || item.httpBody().isNull()) 362 if (item.isNull() || item.httpBody().isNull())
362 return -1; 363 return -1;
363 364
364 return item.httpBody().identifier(); 365 return item.httpBody().identifier();
365 } 366 }
366 367
367 WebURLResponseExtraDataImpl* GetExtraDataFromResponse( 368 WebURLResponseExtraDataImpl* GetExtraDataFromResponse(
368 const WebURLResponse& response) { 369 const WebURLResponse& response) {
(...skipping 6501 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 // event target. Potentially a Pepper plugin will receive the event. 6871 // event target. Potentially a Pepper plugin will receive the event.
6871 // In order to tell whether a plugin gets the last mouse event and which it 6872 // In order to tell whether a plugin gets the last mouse event and which it
6872 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6873 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6873 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6874 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6874 // |pepper_last_mouse_event_target_|. 6875 // |pepper_last_mouse_event_target_|.
6875 pepper_last_mouse_event_target_ = nullptr; 6876 pepper_last_mouse_event_target_ = nullptr;
6876 #endif 6877 #endif
6877 } 6878 }
6878 6879
6879 } // namespace content 6880 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698