| 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 == GURL(kChromeUIHistoryFrameURL) || | 278 if (gurl == kChromeUIHistoryFrameURL || gurl == kChromeUIHistoryURL) { |
| 279 gurl == GURL(kChromeUIHistoryURL)) { | |
| 280 // History menu. | 279 // History menu. |
| 281 *transition_type = DataUseTabModel::TRANSITION_HISTORY_ITEM; | 280 *transition_type = DataUseTabModel::TRANSITION_HISTORY_ITEM; |
| 282 return true; | 281 return true; |
| 283 } | 282 } |
| 284 return false; | 283 return false; |
| 285 case ui::PAGE_TRANSITION_GENERATED: | 284 case ui::PAGE_TRANSITION_GENERATED: |
| 286 // Omnibox search (e.g., searching for "tacos"). | 285 // Omnibox search (e.g., searching for "tacos"). |
| 287 *transition_type = DataUseTabModel::TRANSITION_OMNIBOX_SEARCH; | 286 *transition_type = DataUseTabModel::TRANSITION_OMNIBOX_SEARCH; |
| 288 return true; | 287 return true; |
| 289 case ui::PAGE_TRANSITION_RELOAD: | 288 case ui::PAGE_TRANSITION_RELOAD: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 data_use_tab_model_->OnNavigationEvent( | 344 data_use_tab_model_->OnNavigationEvent( |
| 346 ui_event.tab_id, ui_event.transition_type, ui_event.url, | 345 ui_event.tab_id, ui_event.transition_type, ui_event.url, |
| 347 ui_event.package, nullptr); | 346 ui_event.package, nullptr); |
| 348 } | 347 } |
| 349 } | 348 } |
| 350 } | 349 } |
| 351 | 350 |
| 352 } // namespace android | 351 } // namespace android |
| 353 | 352 |
| 354 } // namespace chrome | 353 } // namespace chrome |
| OLD | NEW |