OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/android/data_usage/data_use_ui_tab_model.h" | 5 #include "chrome/browser/android/data_usage/data_use_ui_tab_model.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 268 } |
269 return true; | 269 return true; |
270 case ui::PAGE_TRANSITION_TYPED: | 270 case ui::PAGE_TRANSITION_TYPED: |
271 *transition_type = DataUseTabModel::TRANSITION_OMNIBOX_NAVIGATION; | 271 *transition_type = DataUseTabModel::TRANSITION_OMNIBOX_NAVIGATION; |
272 return true; | 272 return true; |
273 case ui::PAGE_TRANSITION_AUTO_BOOKMARK: | 273 case ui::PAGE_TRANSITION_AUTO_BOOKMARK: |
274 // Auto bookmark from newtab page. | 274 // Auto bookmark from newtab page. |
275 *transition_type = DataUseTabModel::TRANSITION_BOOKMARK; | 275 *transition_type = DataUseTabModel::TRANSITION_BOOKMARK; |
276 return true; | 276 return true; |
277 case ui::PAGE_TRANSITION_AUTO_TOPLEVEL: | 277 case ui::PAGE_TRANSITION_AUTO_TOPLEVEL: |
278 if (gurl == kChromeUIHistoryFrameURL || gurl == kChromeUIHistoryURL) { | 278 if (gurl == kChromeUIHistoryURL) { |
279 // History menu. | 279 // History menu. |
280 *transition_type = DataUseTabModel::TRANSITION_HISTORY_ITEM; | 280 *transition_type = DataUseTabModel::TRANSITION_HISTORY_ITEM; |
281 return true; | 281 return true; |
282 } | 282 } |
283 return false; | 283 return false; |
284 case ui::PAGE_TRANSITION_GENERATED: | 284 case ui::PAGE_TRANSITION_GENERATED: |
285 // Omnibox search (e.g., searching for "tacos"). | 285 // Omnibox search (e.g., searching for "tacos"). |
286 *transition_type = DataUseTabModel::TRANSITION_OMNIBOX_SEARCH; | 286 *transition_type = DataUseTabModel::TRANSITION_OMNIBOX_SEARCH; |
287 return true; | 287 return true; |
288 case ui::PAGE_TRANSITION_RELOAD: | 288 case ui::PAGE_TRANSITION_RELOAD: |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 data_use_tab_model_->OnNavigationEvent( | 344 data_use_tab_model_->OnNavigationEvent( |
345 ui_event.tab_id, ui_event.transition_type, ui_event.url, | 345 ui_event.tab_id, ui_event.transition_type, ui_event.url, |
346 ui_event.package, nullptr); | 346 ui_event.package, nullptr); |
347 } | 347 } |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 } // namespace android | 351 } // namespace android |
352 | 352 |
353 } // namespace chrome | 353 } // namespace chrome |
OLD | NEW |