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

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

Issue 1435263003: [Android] Show document mode opt-out InfoBar on selected devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Dan's comments Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GE NERATOR_ID, 239 UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GE NERATOR_ID,
240 new UuidBasedUniqueIdentificationGenerator(this, SESSIONS_UUID_P REF_KEY), false); 240 new UuidBasedUniqueIdentificationGenerator(this, SESSIONS_UUID_P REF_KEY), false);
241 } 241 }
242 242
243 /** 243 /**
244 * Each top-level activity (ChromeTabbedActivity, FullscreenActivity) should call this during 244 * Each top-level activity (ChromeTabbedActivity, FullscreenActivity) should call this during
245 * its onStart phase. When called for the first time, this marks the beginni ng of a foreground 245 * its onStart phase. When called for the first time, this marks the beginni ng of a foreground
246 * session and calls onForegroundSessionStart(). Subsequent calls are noops until 246 * session and calls onForegroundSessionStart(). Subsequent calls are noops until
247 * onForegroundSessionEnd() is called, to handle changing top-level Chrome a ctivities in one 247 * onForegroundSessionEnd() is called, to handle changing top-level Chrome a ctivities in one
248 * foreground session. 248 * foreground session.
249 *
250 * @return Whether foreground session is started by this call, i.e., there w as no Chrome process
251 * running already.
249 */ 252 */
250 public void onStartWithNative() { 253 public boolean onStartWithNative() {
251 if (mIsStarted) return; 254 if (mIsStarted) return false;
252 mIsStarted = true; 255 mIsStarted = true;
253 256
254 assert mIsProcessInitialized; 257 assert mIsProcessInitialized;
255 258
256 onForegroundSessionStart(); 259 onForegroundSessionStart();
260
261 return true;
257 } 262 }
258 263
259 /** 264 /**
260 * Called when a top-level Chrome activity (ChromeTabbedActivity, Fullscreen Activity) is 265 * Called when a top-level Chrome activity (ChromeTabbedActivity, Fullscreen Activity) is
261 * started in foreground. It will not be called again when other Chrome acti vities take over 266 * started in foreground. It will not be called again when other Chrome acti vities take over
262 * (see onStart()), that is, when correct activity calls startActivity() for another Chrome 267 * (see onStart()), that is, when correct activity calls startActivity() for another Chrome
263 * activity. 268 * activity.
264 */ 269 */
265 private void onForegroundSessionStart() { 270 private void onForegroundSessionStart() {
266 ChildProcessLauncher.onBroughtToForeground(); 271 ChildProcessLauncher.onBroughtToForeground();
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 */ 925 */
921 private void updatePasswordEchoState() { 926 private void updatePasswordEchoState() {
922 boolean systemEnabled = Settings.System.getInt( 927 boolean systemEnabled = Settings.System.getInt(
923 getApplicationContext().getContentResolver(), 928 getApplicationContext().getContentResolver(),
924 Settings.System.TEXT_SHOW_PASSWORD, 1) == 1; 929 Settings.System.TEXT_SHOW_PASSWORD, 1) == 1;
925 if (PrefServiceBridge.getInstance().getPasswordEchoEnabled() == systemEn abled) return; 930 if (PrefServiceBridge.getInstance().getPasswordEchoEnabled() == systemEn abled) return;
926 931
927 PrefServiceBridge.getInstance().setPasswordEchoEnabled(systemEnabled); 932 PrefServiceBridge.getInstance().setPasswordEchoEnabled(systemEnabled);
928 } 933 }
929 } 934 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698