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

Side by Side Diff: content/browser/download/mhtml_generation_manager.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 "content/browser/download/mhtml_generation_manager.h" 5 #include "content/browser/download/mhtml_generation_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 int exit_code) { 78 int exit_code) {
79 MHTMLGenerationManager::GetInstance()->RenderProcessExited(this); 79 MHTMLGenerationManager::GetInstance()->RenderProcessExited(this);
80 } 80 }
81 81
82 void MHTMLGenerationManager::Job::RenderProcessHostDestroyed( 82 void MHTMLGenerationManager::Job::RenderProcessHostDestroyed(
83 RenderProcessHost* host) { 83 RenderProcessHost* host) {
84 host_ = NULL; 84 host_ = NULL;
85 } 85 }
86 86
87 MHTMLGenerationManager* MHTMLGenerationManager::GetInstance() { 87 MHTMLGenerationManager* MHTMLGenerationManager::GetInstance() {
88 return Singleton<MHTMLGenerationManager>::get(); 88 return base::Singleton<MHTMLGenerationManager>::get();
89 } 89 }
90 90
91 MHTMLGenerationManager::MHTMLGenerationManager() { 91 MHTMLGenerationManager::MHTMLGenerationManager() {
92 } 92 }
93 93
94 MHTMLGenerationManager::~MHTMLGenerationManager() { 94 MHTMLGenerationManager::~MHTMLGenerationManager() {
95 STLDeleteValues(&id_to_job_); 95 STLDeleteValues(&id_to_job_);
96 } 96 }
97 97
98 void MHTMLGenerationManager::SaveMHTML(WebContents* web_contents, 98 void MHTMLGenerationManager::SaveMHTML(WebContents* web_contents,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ++it) { 229 ++it) {
230 if (it->second == job) { 230 if (it->second == job) {
231 JobFinished(it->first, -1); 231 JobFinished(it->first, -1);
232 return; 232 return;
233 } 233 }
234 } 234 }
235 NOTREACHED(); 235 NOTREACHED();
236 } 236 }
237 237
238 } // namespace content 238 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/mhtml_generation_manager.h ('k') | content/browser/gamepad/gamepad_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698