| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ | 5 #ifndef CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ |
| 6 #define CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ | 6 #define CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // navigation information on the IO thread. | 50 // navigation information on the IO thread. |
| 51 class ChromeDataUseAscriber : public DataUseAscriber { | 51 class ChromeDataUseAscriber : public DataUseAscriber { |
| 52 public: | 52 public: |
| 53 ChromeDataUseAscriber(); | 53 ChromeDataUseAscriber(); |
| 54 | 54 |
| 55 ~ChromeDataUseAscriber() override; | 55 ~ChromeDataUseAscriber() override; |
| 56 | 56 |
| 57 // DataUseAscriber implementation: | 57 // DataUseAscriber implementation: |
| 58 ChromeDataUseRecorder* GetDataUseRecorder(net::URLRequest* request, | 58 ChromeDataUseRecorder* GetDataUseRecorder(net::URLRequest* request, |
| 59 bool can_create_new) override; | 59 bool can_create_new) override; |
| 60 const DataUseRecorder* GetDataUseRecorderIfExists( |
| 61 const net::URLRequest* request) const override; |
| 60 void OnUrlRequestDestroyed(net::URLRequest* request) override; | 62 void OnUrlRequestDestroyed(net::URLRequest* request) override; |
| 61 std::unique_ptr<URLRequestClassifier> CreateURLRequestClassifier() | 63 std::unique_ptr<URLRequestClassifier> CreateURLRequestClassifier() |
| 62 const override; | 64 const override; |
| 63 | 65 |
| 64 // Called when a render frame host is created. When the render frame is a main | 66 // Called when a render frame host is created. When the render frame is a main |
| 65 // frame, |main_render_process_id| and |main_render_frame_id| should be -1. | 67 // frame, |main_render_process_id| and |main_render_frame_id| should be -1. |
| 66 void RenderFrameCreated(int render_process_id, | 68 void RenderFrameCreated(int render_process_id, |
| 67 int render_frame_id, | 69 int render_frame_id, |
| 68 int main_render_process_id, | 70 int main_render_process_id, |
| 69 int main_render_frame_id); | 71 int main_render_frame_id); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 170 |
| 169 // Contains the mainframe IDs that are currently visible. | 171 // Contains the mainframe IDs that are currently visible. |
| 170 base::hash_set<RenderFrameHostID> visible_main_render_frames_; | 172 base::hash_set<RenderFrameHostID> visible_main_render_frames_; |
| 171 | 173 |
| 172 DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber); | 174 DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber); |
| 173 }; | 175 }; |
| 174 | 176 |
| 175 } // namespace data_use_measurement | 177 } // namespace data_use_measurement |
| 176 | 178 |
| 177 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ | 179 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ |
| OLD | NEW |