Skip to content

Commit

Permalink
Change a few LazyInstances in printing code to be Leaky.
Browse files Browse the repository at this point in the history
BUG=698982

Review-Url: https://codereview.chromium.org/2813503004
Cr-Commit-Position: refs/heads/master@{#463526}
  • Loading branch information
leizleiz authored and Commit bot committed Apr 11, 2017
1 parent 61358d5 commit 6c884e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions chrome/browser/printing/print_view_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ namespace {

// Keeps track of pending scripted print preview closures.
// No locking, only access on the UI thread.
base::LazyInstance<std::map<content::RenderProcessHost*, base::Closure>>::
DestructorAtExit g_scripted_print_preview_closure_map =
LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<std::map<content::RenderProcessHost*, base::Closure>>::Leaky
g_scripted_print_preview_closure_map = LAZY_INSTANCE_INITIALIZER;

void EnableInternalPDFPluginForContents(int render_process_id,
int render_frame_id) {
Expand Down
2 changes: 1 addition & 1 deletion printing/print_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace printing {

base::LazyInstance<std::string>::DestructorAtExit g_user_agent;
base::LazyInstance<std::string>::Leaky g_user_agent;

void SetAgent(const std::string& user_agent) {
g_user_agent.Get() = user_agent;
Expand Down
2 changes: 1 addition & 1 deletion printing/printed_document.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace printing {

namespace {

base::LazyInstance<base::FilePath>::DestructorAtExit g_debug_dump_info =
base::LazyInstance<base::FilePath>::Leaky g_debug_dump_info =
LAZY_INSTANCE_INITIALIZER;

void DebugDumpPageTask(const base::string16& doc_name,
Expand Down

0 comments on commit 6c884e6

Please sign in to comment.