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

Side by Side Diff: content/browser/frame_host/frame_tree_node.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 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/browser/frame_host/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 14 matching lines...) Expand all
25 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 25 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
26 26
27 namespace content { 27 namespace content {
28 28
29 namespace { 29 namespace {
30 30
31 // This is a global map between frame_tree_node_ids and pointers to 31 // This is a global map between frame_tree_node_ids and pointers to
32 // FrameTreeNodes. 32 // FrameTreeNodes.
33 typedef base::hash_map<int, FrameTreeNode*> FrameTreeNodeIdMap; 33 typedef base::hash_map<int, FrameTreeNode*> FrameTreeNodeIdMap;
34 34
35 base::LazyInstance<FrameTreeNodeIdMap> g_frame_tree_node_id_map = 35 base::LazyInstance<FrameTreeNodeIdMap>::DestructorAtExit
36 LAZY_INSTANCE_INITIALIZER; 36 g_frame_tree_node_id_map = LAZY_INSTANCE_INITIALIZER;
37 37
38 // These values indicate the loading progress status. The minimum progress 38 // These values indicate the loading progress status. The minimum progress
39 // value matches what Blink's ProgressTracker has traditionally used for a 39 // value matches what Blink's ProgressTracker has traditionally used for a
40 // minimum progress value. 40 // minimum progress value.
41 const double kLoadingProgressNotStarted = 0.0; 41 const double kLoadingProgressNotStarted = 0.0;
42 const double kLoadingProgressMinimum = 0.1; 42 const double kLoadingProgressMinimum = 0.1;
43 const double kLoadingProgressDone = 1.0; 43 const double kLoadingProgressDone = 1.0;
44 44
45 void RecordUniqueNameLength(size_t length) { 45 void RecordUniqueNameLength(size_t length) {
46 UMA_HISTOGRAM_COUNTS("SessionRestore.FrameUniqueNameLength", length); 46 UMA_HISTOGRAM_COUNTS("SessionRestore.FrameUniqueNameLength", length);
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 556 }
557 return parent_->child_at(i + relative_offset); 557 return parent_->child_at(i + relative_offset);
558 } 558 }
559 } 559 }
560 560
561 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 561 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
562 return nullptr; 562 return nullptr;
563 } 563 }
564 564
565 } // namespace content 565 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698