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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h

Issue 2378173002: Precache per-resource cap should be applied on network bytes used (Closed)
Patch Set: 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 | chrome/browser/extensions/api/image_writer_private/write_from_url_operation.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_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_WRITE_FROM_URL_OPERAT ION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_WRITE_FROM_URL_OPERAT ION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_WRITE_FROM_URL_OPERAT ION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_WRITE_FROM_URL_OPERAT ION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "chrome/browser/extensions/api/image_writer_private/operation.h" 10 #include "chrome/browser/extensions/api/image_writer_private/operation.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 private: 49 private:
50 // Destroys the URLFetcher. The URLFetcher needs to be destroyed on the same 50 // Destroys the URLFetcher. The URLFetcher needs to be destroyed on the same
51 // thread it was created on. The Operation may be deleted on the UI thread 51 // thread it was created on. The Operation may be deleted on the UI thread
52 // and so we must first delete the URLFetcher on the FILE thread. 52 // and so we must first delete the URLFetcher on the FILE thread.
53 void DestroyUrlFetcher(); 53 void DestroyUrlFetcher();
54 54
55 // URLFetcherDelegate implementation. 55 // URLFetcherDelegate implementation.
56 void OnURLFetchComplete(const net::URLFetcher* source) override; 56 void OnURLFetchComplete(const net::URLFetcher* source) override;
57 void OnURLFetchDownloadProgress(const net::URLFetcher* source, 57 void OnURLFetchDownloadProgress(const net::URLFetcher* source,
58 int64_t current, 58 int64_t current,
59 int64_t total) override; 59 int64_t total,
60 int64_t current_network_bytes) override;
60 void OnURLFetchUploadProgress(const net::URLFetcher* source, 61 void OnURLFetchUploadProgress(const net::URLFetcher* source,
61 int64_t current, 62 int64_t current,
62 int64_t total) override; 63 int64_t total) override;
63 64
64 void VerifyDownloadCompare(const base::Closure& continuation, 65 void VerifyDownloadCompare(const base::Closure& continuation,
65 const std::string& download_hash); 66 const std::string& download_hash);
66 void VerifyDownloadComplete(const base::Closure& continuation); 67 void VerifyDownloadComplete(const base::Closure& continuation);
67 68
68 // Arguments 69 // Arguments
69 net::URLRequestContextGetter* request_context_; 70 net::URLRequestContextGetter* request_context_;
70 GURL url_; 71 GURL url_;
71 const std::string hash_; 72 const std::string hash_;
72 73
73 // Local state 74 // Local state
74 std::unique_ptr<net::URLFetcher> url_fetcher_; 75 std::unique_ptr<net::URLFetcher> url_fetcher_;
75 base::Closure download_continuation_; 76 base::Closure download_continuation_;
76 }; 77 };
77 78
78 } // namespace image_writer 79 } // namespace image_writer
79 } // namespace extensions 80 } // namespace extensions
80 81
81 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_WRITE_FROM_URL_OPE RATION_H_ 82 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_WRITE_FROM_URL_OPE RATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698