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

Side by Side Diff: components/sync/android/java/src/org/chromium/components/sync/notifier/InvalidationPreferences.java

Issue 2155763002: [Sync] //components/sync manual changes [DO NOT SUBMIT] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sc-automated
Patch Set: Rebase. Created 4 years, 5 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 | « components/sync/android/DEPS ('k') | components/sync/android/model_type_helper.h » ('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 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.components.sync.notifier; 5 package org.chromium.components.sync.notifier;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 import android.util.Base64; 9 import android.util.Base64;
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 @VisibleForTesting 70 @VisibleForTesting
71 public static final String SYNC_ACCT_NAME = "sync_acct_name"; 71 public static final String SYNC_ACCT_NAME = "sync_acct_name";
72 72
73 /** Shared preference key to store the type of account in use. */ 73 /** Shared preference key to store the type of account in use. */
74 static final String SYNC_ACCT_TYPE = "sync_acct_type"; 74 static final String SYNC_ACCT_TYPE = "sync_acct_type";
75 75
76 /** Shared preference key to store internal notification client library state. */ 76 /** Shared preference key to store internal notification client library state. */
77 static final String SYNC_TANGO_INTERNAL_STATE = "sync_tango_internal_sta te"; 77 static final String SYNC_TANGO_INTERNAL_STATE = "sync_tango_internal_sta te";
78 } 78 }
79 79
80 private static final String TAG = "InvalidationPreferences"; 80 private static final String TAG = "InvalidationPrefs";
81 81
82 // Only one commit call can be in progress at a time. 82 // Only one commit call can be in progress at a time.
83 private static final Object sCommitLock = new Object(); 83 private static final Object sCommitLock = new Object();
84 84
85 /** Returns a new {@link EditContext} to modify the preferences managed by t his class. */ 85 /** Returns a new {@link EditContext} to modify the preferences managed by t his class. */
86 public EditContext edit() { 86 public EditContext edit() {
87 return new EditContext(); 87 return new EditContext();
88 } 88 }
89 89
90 /** 90 /**
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int objectSource; 200 int objectSource;
201 try { 201 try {
202 objectSource = Integer.parseInt(objectIdString.substring(0, separato rPos)); 202 objectSource = Integer.parseInt(objectIdString.substring(0, separato rPos));
203 } catch (NumberFormatException e) { 203 } catch (NumberFormatException e) {
204 return null; 204 return null;
205 } 205 }
206 byte[] objectName = objectIdString.substring(separatorPos + 1).getBytes( ); 206 byte[] objectName = objectIdString.substring(separatorPos + 1).getBytes( );
207 return ObjectId.newInstance(objectSource, objectName); 207 return ObjectId.newInstance(objectSource, objectName);
208 } 208 }
209 } 209 }
OLDNEW
« no previous file with comments | « components/sync/android/DEPS ('k') | components/sync/android/model_type_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698