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

Side by Side Diff: chrome/renderer/extensions/extension_localization_peer.h

Issue 2835123005: Send the decoded size when response completed and stop summing in ResourceLoader::DidReceiveData() (Closed)
Patch Set: Created 3 years, 7 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 | chrome/renderer/extensions/extension_localization_peer.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 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 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 30 matching lines...) Expand all
41 const content::ResourceResponseInfo& info) override; 41 const content::ResourceResponseInfo& info) override;
42 void OnReceivedResponse(const content::ResourceResponseInfo& info) override; 42 void OnReceivedResponse(const content::ResourceResponseInfo& info) override;
43 void OnDownloadedData(int len, int encoded_data_length) override {} 43 void OnDownloadedData(int len, int encoded_data_length) override {}
44 void OnReceivedData(std::unique_ptr<ReceivedData> data) override; 44 void OnReceivedData(std::unique_ptr<ReceivedData> data) override;
45 void OnTransferSizeUpdated(int transfer_size_diff) override; 45 void OnTransferSizeUpdated(int transfer_size_diff) override;
46 void OnCompletedRequest(int error_code, 46 void OnCompletedRequest(int error_code,
47 bool was_ignored_by_handler, 47 bool was_ignored_by_handler,
48 bool stale_copy_in_cache, 48 bool stale_copy_in_cache,
49 const base::TimeTicks& completion_time, 49 const base::TimeTicks& completion_time,
50 int64_t total_transfer_size, 50 int64_t total_transfer_size,
51 int64_t encoded_body_size) override; 51 int64_t encoded_body_size,
52 int64_t decoded_body_size) override;
52 53
53 private: 54 private:
54 friend class ExtensionLocalizationPeerTest; 55 friend class ExtensionLocalizationPeerTest;
55 56
56 // Use CreateExtensionLocalizationPeer to create an instance. 57 // Use CreateExtensionLocalizationPeer to create an instance.
57 ExtensionLocalizationPeer(std::unique_ptr<content::RequestPeer> peer, 58 ExtensionLocalizationPeer(std::unique_ptr<content::RequestPeer> peer,
58 IPC::Sender* message_sender, 59 IPC::Sender* message_sender,
59 const GURL& request_url); 60 const GURL& request_url);
60 61
61 // Loads message catalogs, and replaces all __MSG_some_name__ templates within 62 // Loads message catalogs, and replaces all __MSG_some_name__ templates within
(...skipping 14 matching lines...) Expand all
76 std::string data_; 77 std::string data_;
77 78
78 // Original request URL. 79 // Original request URL.
79 GURL request_url_; 80 GURL request_url_;
80 81
81 private: 82 private:
82 DISALLOW_COPY_AND_ASSIGN(ExtensionLocalizationPeer); 83 DISALLOW_COPY_AND_ASSIGN(ExtensionLocalizationPeer);
83 }; 84 };
84 85
85 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ 86 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/extension_localization_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698