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

Side by Side Diff: chrome/renderer/resources/extensions/searchbox_api.js

Issue 701973002: Separate checking the user identity and checking if the user is syncing his history in two differen… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Answered mathp Created 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 var chrome; 5 var chrome;
6 if (!chrome) 6 if (!chrome)
7 chrome = {}; 7 chrome = {};
8 8
9 if (!chrome.embeddedSearch) { 9 if (!chrome.embeddedSearch) {
10 chrome.embeddedSearch = new function() { 10 chrome.embeddedSearch = new function() {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 //TODO(jered): Remove this empty method when google no longer requires it. 74 //TODO(jered): Remove this empty method when google no longer requires it.
75 this.setRestrictedValue = function() {}; 75 this.setRestrictedValue = function() {};
76 }; 76 };
77 77
78 this.newTabPage = new function() { 78 this.newTabPage = new function() {
79 79
80 // ======================================================================= 80 // =======================================================================
81 // Private functions 81 // Private functions
82 // ======================================================================= 82 // =======================================================================
83 native function CheckIsUserSignedInToChromeAs(); 83 native function CheckIsUserSignedInToChromeAs();
84 native function CheckIsUserSyncingHistory();
84 native function DeleteMostVisitedItem(); 85 native function DeleteMostVisitedItem();
85 native function GetAppLauncherEnabled(); 86 native function GetAppLauncherEnabled();
86 native function GetDispositionFromClick(); 87 native function GetDispositionFromClick();
87 native function GetMostVisitedItems(); 88 native function GetMostVisitedItems();
88 native function GetThemeBackgroundInfo(); 89 native function GetThemeBackgroundInfo();
89 native function IsInputInProgress(); 90 native function IsInputInProgress();
90 native function LogEvent(); 91 native function LogEvent();
91 native function LogMostVisitedImpression(); 92 native function LogMostVisitedImpression();
92 native function LogMostVisitedNavigation(); 93 native function LogMostVisitedNavigation();
93 native function NavigateContentWindow(); 94 native function NavigateContentWindow();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 alt_key, 137 alt_key,
137 ctrl_key, 138 ctrl_key,
138 meta_key, 139 meta_key,
139 shift_key); 140 shift_key);
140 }; 141 };
141 142
142 this.checkIsUserSignedIntoChromeAs = function(identity) { 143 this.checkIsUserSignedIntoChromeAs = function(identity) {
143 CheckIsUserSignedInToChromeAs(identity); 144 CheckIsUserSignedInToChromeAs(identity);
144 }; 145 };
145 146
147 this.checkIsUserSyncingHistory = function() {
148 CheckIsUserSyncingHistory();
149 };
150
146 // This method is restricted to chrome-search://most-visited pages by 151 // This method is restricted to chrome-search://most-visited pages by
147 // checking the invoking context's origin in searchbox_extension.cc. 152 // checking the invoking context's origin in searchbox_extension.cc.
148 this.logEvent = function(histogram_name) { 153 this.logEvent = function(histogram_name) {
149 LogEvent(histogram_name); 154 LogEvent(histogram_name);
150 }; 155 };
151 156
152 // This method is restricted to chrome-search://most-visited pages by 157 // This method is restricted to chrome-search://most-visited pages by
153 // checking the invoking context's origin in searchbox_extension.cc. 158 // checking the invoking context's origin in searchbox_extension.cc.
154 this.logMostVisitedImpression = function(position, provider) { 159 this.logMostVisitedImpression = function(position, provider) {
155 LogMostVisitedImpression(position, provider); 160 LogMostVisitedImpression(position, provider);
(...skipping 11 matching lines...) Expand all
167 172
168 this.undoAllMostVisitedDeletions = function() { 173 this.undoAllMostVisitedDeletions = function() {
169 UndoAllMostVisitedDeletions(); 174 UndoAllMostVisitedDeletions();
170 }; 175 };
171 176
172 this.undoMostVisitedDeletion = function(restrictedId) { 177 this.undoMostVisitedDeletion = function(restrictedId) {
173 UndoMostVisitedDeletion(restrictedId); 178 UndoMostVisitedDeletion(restrictedId);
174 }; 179 };
175 180
176 this.onsignedincheckdone = null; 181 this.onsignedincheckdone = null;
182 this.onhistorysynccheckdone = null;
kmadhusu 2014/11/19 19:56:19 Please make sure you update http://www.chromium.or
beaudoin 2014/11/20 22:58:26 I will do as soon as this is landed. I'll also doc
177 this.oninputcancel = null; 183 this.oninputcancel = null;
178 this.oninputstart = null; 184 this.oninputstart = null;
179 this.onmostvisitedchange = null; 185 this.onmostvisitedchange = null;
180 this.onthemechange = null; 186 this.onthemechange = null;
181 }; 187 };
182 188
183 // TODO(jered): Remove when google no longer expects this object. 189 // TODO(jered): Remove when google no longer expects this object.
184 chrome.searchBox = this.searchBox; 190 chrome.searchBox = this.searchBox;
185 }; 191 };
186 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698