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

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 kmadhusu and dcheng 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 //TODO(jered): Remove this empty method when google no longer requires it. 77 //TODO(jered): Remove this empty method when google no longer requires it.
78 this.setRestrictedValue = function() {}; 78 this.setRestrictedValue = function() {};
79 }; 79 };
80 80
81 this.newTabPage = new function() { 81 this.newTabPage = new function() {
82 82
83 // ======================================================================= 83 // =======================================================================
84 // Private functions 84 // Private functions
85 // ======================================================================= 85 // =======================================================================
86 native function CheckIsUserSignedInToChromeAs(); 86 native function CheckIsUserSignedInToChromeAs();
87 native function CheckIsUserSyncingHistory();
87 native function DeleteMostVisitedItem(); 88 native function DeleteMostVisitedItem();
88 native function GetAppLauncherEnabled(); 89 native function GetAppLauncherEnabled();
89 native function GetDispositionFromClick(); 90 native function GetDispositionFromClick();
90 native function GetMostVisitedItems(); 91 native function GetMostVisitedItems();
91 native function GetThemeBackgroundInfo(); 92 native function GetThemeBackgroundInfo();
92 native function IsInputInProgress(); 93 native function IsInputInProgress();
93 native function LogEvent(); 94 native function LogEvent();
94 native function LogMostVisitedImpression(); 95 native function LogMostVisitedImpression();
95 native function LogMostVisitedNavigation(); 96 native function LogMostVisitedNavigation();
96 native function NavigateContentWindow(); 97 native function NavigateContentWindow();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 alt_key, 140 alt_key,
140 ctrl_key, 141 ctrl_key,
141 meta_key, 142 meta_key,
142 shift_key); 143 shift_key);
143 }; 144 };
144 145
145 this.checkIsUserSignedIntoChromeAs = function(identity) { 146 this.checkIsUserSignedIntoChromeAs = function(identity) {
146 CheckIsUserSignedInToChromeAs(identity); 147 CheckIsUserSignedInToChromeAs(identity);
147 }; 148 };
148 149
150 this.checkIsUserSyncingHistory = function() {
151 CheckIsUserSyncingHistory();
152 };
153
149 // This method is restricted to chrome-search://most-visited pages by 154 // This method is restricted to chrome-search://most-visited pages by
150 // checking the invoking context's origin in searchbox_extension.cc. 155 // checking the invoking context's origin in searchbox_extension.cc.
151 this.logEvent = function(histogram_name) { 156 this.logEvent = function(histogram_name) {
152 LogEvent(histogram_name); 157 LogEvent(histogram_name);
153 }; 158 };
154 159
155 // This method is restricted to chrome-search://most-visited pages by 160 // This method is restricted to chrome-search://most-visited pages by
156 // checking the invoking context's origin in searchbox_extension.cc. 161 // checking the invoking context's origin in searchbox_extension.cc.
157 this.logMostVisitedImpression = function(position, provider) { 162 this.logMostVisitedImpression = function(position, provider) {
158 LogMostVisitedImpression(position, provider); 163 LogMostVisitedImpression(position, provider);
(...skipping 11 matching lines...) Expand all
170 175
171 this.undoAllMostVisitedDeletions = function() { 176 this.undoAllMostVisitedDeletions = function() {
172 UndoAllMostVisitedDeletions(); 177 UndoAllMostVisitedDeletions();
173 }; 178 };
174 179
175 this.undoMostVisitedDeletion = function(restrictedId) { 180 this.undoMostVisitedDeletion = function(restrictedId) {
176 UndoMostVisitedDeletion(restrictedId); 181 UndoMostVisitedDeletion(restrictedId);
177 }; 182 };
178 183
179 this.onsignedincheckdone = null; 184 this.onsignedincheckdone = null;
185 this.onhistorysynccheckdone = null;
180 this.oninputcancel = null; 186 this.oninputcancel = null;
181 this.oninputstart = null; 187 this.oninputstart = null;
182 this.onmostvisitedchange = null; 188 this.onmostvisitedchange = null;
183 this.onthemechange = null; 189 this.onthemechange = null;
184 }; 190 };
185 191
186 // TODO(jered): Remove when google no longer expects this object. 192 // TODO(jered): Remove when google no longer expects this object.
187 chrome.searchBox = this.searchBox; 193 chrome.searchBox = this.searchBox;
188 }; 194 };
189 } 195 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698