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

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

Issue 2364923004: Add UMA histograms to MHTML save operations. (Closed)
Patch Set: Address code review comments. Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 4 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
5 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 5 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void SaveMHTML(WebContents* web_contents, 46 void SaveMHTML(WebContents* web_contents,
47 const MHTMLGenerationParams& params, 47 const MHTMLGenerationParams& params,
48 const GenerateMHTMLCallback& callback); 48 const GenerateMHTMLCallback& callback);
49 49
50 // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the 50 // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the
51 // renderer that the MHTML generation finished for a single frame). 51 // renderer that the MHTML generation finished for a single frame).
52 void OnSerializeAsMHTMLResponse( 52 void OnSerializeAsMHTMLResponse(
53 RenderFrameHostImpl* sender, 53 RenderFrameHostImpl* sender,
54 int job_id, 54 int job_id,
55 bool mhtml_generation_in_renderer_succeeded, 55 bool mhtml_generation_in_renderer_succeeded,
56 const std::set<std::string>& digests_of_uris_of_serialized_resources); 56 const std::set<std::string>& digests_of_uris_of_serialized_resources,
57 base::TimeDelta renderer_main_thread_time);
57 58
58 private: 59 private:
59 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>; 60 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>;
60 class Job; 61 class Job;
61 enum class JobStatus { SUCCESS, FAILURE }; 62 enum class JobStatus { SUCCESS, FAILURE };
62 63
63 MHTMLGenerationManager(); 64 MHTMLGenerationManager();
64 virtual ~MHTMLGenerationManager(); 65 virtual ~MHTMLGenerationManager();
65 66
66 // Called on the file thread to create |file|. 67 // Called on the file thread to create |file|.
(...skipping 24 matching lines...) Expand all
91 IDToJobMap id_to_job_; 92 IDToJobMap id_to_job_;
92 93
93 int next_job_id_; 94 int next_job_id_;
94 95
95 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); 96 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager);
96 }; 97 };
97 98
98 } // namespace content 99 } // namespace content
99 100
100 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 101 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698