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

Unified Diff: chrome/browser/android/download/download_manager_service.cc

Issue 2562993002: Disallow [in]equality operator for PageTransition (Closed)
Patch Set: Disallow [in]equality operator for PageTransition Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/net_error_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/download/download_manager_service.cc
diff --git a/chrome/browser/android/download/download_manager_service.cc b/chrome/browser/android/download/download_manager_service.cc
index 014290063cbe4fe420d0afecccb2c4a81d25506b..22775e962c18d2acbbcce966216683fa5a84e847 100644
--- a/chrome/browser/android/download/download_manager_service.cc
+++ b/chrome/browser/android/download/download_manager_service.cc
@@ -80,15 +80,18 @@ DownloadManagerService* DownloadManagerService::GetInstance() {
// static
ScopedJavaLocalRef<jobject> DownloadManagerService::CreateJavaDownloadInfo(
JNIEnv* env, content::DownloadItem* item) {
- ui::PageTransition base_transition =
- ui::PageTransitionStripQualifier(item->GetTransitionType());
bool user_initiated =
(item->GetTransitionType() & ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) ||
- base_transition == ui::PAGE_TRANSITION_TYPED ||
- base_transition == ui::PAGE_TRANSITION_AUTO_BOOKMARK ||
- base_transition == ui::PAGE_TRANSITION_GENERATED ||
- base_transition == ui::PAGE_TRANSITION_RELOAD ||
- base_transition == ui::PAGE_TRANSITION_KEYWORD;
+ PageTransitionCoreTypeIs(item->GetTransitionType(),
+ ui::PAGE_TRANSITION_TYPED) ||
+ PageTransitionCoreTypeIs(item->GetTransitionType(),
+ ui::PAGE_TRANSITION_AUTO_BOOKMARK) ||
+ PageTransitionCoreTypeIs(item->GetTransitionType(),
+ ui::PAGE_TRANSITION_GENERATED) ||
+ PageTransitionCoreTypeIs(item->GetTransitionType(),
+ ui::PAGE_TRANSITION_RELOAD) ||
+ PageTransitionCoreTypeIs(item->GetTransitionType(),
+ ui::PAGE_TRANSITION_KEYWORD);
bool has_user_gesture = item->HasUserGesture() || user_initiated;
base::TimeDelta time_delta;
« no previous file with comments | « no previous file | chrome/browser/net/net_error_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698