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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Issue 1679223003: [NTP Snippets] Make a base::Feature instead of raw cmdline flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@may_ntp
Patch Set: rebase Created 4 years, 10 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/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java » ('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 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 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 removeSnapshotDatabase(); 689 removeSnapshotDatabase();
690 if (mToolbarManager != null) { 690 if (mToolbarManager != null) {
691 String simpleName = getClass().getSimpleName(); 691 String simpleName = getClass().getSimpleName();
692 RecordHistogram.recordTimesHistogram("MobileStartup.ToolbarInflation Time." + simpleName, 692 RecordHistogram.recordTimesHistogram("MobileStartup.ToolbarInflation Time." + simpleName,
693 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS); 693 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS);
694 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleNa me); 694 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleNa me);
695 } 695 }
696 recordKeyboardLocaleUma(); 696 recordKeyboardLocaleUma();
697 697
698 // TODO(treib): Remove this when we have the proper morning reads fetchi ng logic in place 698 // TODO(treib): Remove this when we have the proper morning reads fetchi ng logic in place
699 if (CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_NTP_SNIPPE TS)) { 699 if (ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)) {
700 // Initialize snippets 700 // Initialize snippets
701 SnippetsController.get(this).fetchSnippets(false); 701 SnippetsController.get(this).fetchSnippets(false);
702 } 702 }
703 } 703 }
704 704
705 @Override 705 @Override
706 public void onStart() { 706 public void onStart() {
707 super.onStart(); 707 super.onStart();
708 if (mContextReporter != null) mContextReporter.enable(); 708 if (mContextReporter != null) mContextReporter.enable();
709 709
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 public static int getThemeId() { 1623 public static int getThemeId() {
1624 boolean useLowEndTheme = 1624 boolean useLowEndTheme =
1625 SysUtils.isLowEndDevice() && Build.VERSION.SDK_INT >= Build.VERS ION_CODES.LOLLIPOP; 1625 SysUtils.isLowEndDevice() && Build.VERSION.SDK_INT >= Build.VERS ION_CODES.LOLLIPOP;
1626 return (useLowEndTheme ? R.style.MainTheme_LowEnd : R.style.MainTheme); 1626 return (useLowEndTheme ? R.style.MainTheme_LowEnd : R.style.MainTheme);
1627 } 1627 }
1628 1628
1629 private void setLowEndTheme() { 1629 private void setLowEndTheme() {
1630 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme _LowEnd); 1630 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme _LowEnd);
1631 } 1631 }
1632 } 1632 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698