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

Side by Side Diff: chrome/browser/sync/glue/extension_model_associator.cc

Issue 2867036: sync: Remove unused function ChromeModelHasUserCreatedNodes. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: explicit Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/sync/glue/extension_model_associator.h" 5 #include "chrome/browser/sync/glue/extension_model_associator.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (!root.InitByTagLookup(kExtensionsTag)) { 189 if (!root.InitByTagLookup(kExtensionsTag)) {
190 LOG(ERROR) << kNoExtensionsFolderError; 190 LOG(ERROR) << kNoExtensionsFolderError;
191 return false; 191 return false;
192 } 192 }
193 // The sync model has user created nodes iff the extensions folder has 193 // The sync model has user created nodes iff the extensions folder has
194 // any children. 194 // any children.
195 *has_nodes = root.GetFirstChildId() != sync_api::kInvalidId; 195 *has_nodes = root.GetFirstChildId() != sync_api::kInvalidId;
196 return true; 196 return true;
197 } 197 }
198 198
199 bool ExtensionModelAssociator::ChromeModelHasUserCreatedNodes(
200 bool* has_nodes) {
201 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
202 CHECK(has_nodes);
203 // This is wrong, but this function is unused, anyway.
204 *has_nodes = true;
205 return true;
206 }
207
208 bool ExtensionModelAssociator::OnClientUpdate(const std::string& id) { 199 bool ExtensionModelAssociator::OnClientUpdate(const std::string& id) {
209 sync_api::WriteTransaction trans( 200 sync_api::WriteTransaction trans(
210 sync_service_->backend()->GetUserShareHandle()); 201 sync_service_->backend()->GetUserShareHandle());
211 sync_api::ReadNode root(&trans); 202 sync_api::ReadNode root(&trans);
212 if (!root.InitByTagLookup(kExtensionsTag)) { 203 if (!root.InitByTagLookup(kExtensionsTag)) {
213 LOG(ERROR) << kNoExtensionsFolderError; 204 LOG(ERROR) << kNoExtensionsFolderError;
214 return false; 205 return false;
215 } 206 }
216 207
217 sync_pb::ExtensionSpecifics client_data; 208 sync_pb::ExtensionSpecifics client_data;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // ExtensionsService in ProfileImpl::InitExtensions()). 391 // ExtensionsService in ProfileImpl::InitExtensions()).
401 if (extension_updater) { 392 if (extension_updater) {
402 extension_updater->CheckNow(); 393 extension_updater->CheckNow();
403 } else { 394 } else {
404 LOG(DFATAL) << "Extension updater unexpectedly NULL; " 395 LOG(DFATAL) << "Extension updater unexpectedly NULL; "
405 << "auto-updates may be turned off"; 396 << "auto-updates may be turned off";
406 } 397 }
407 } 398 }
408 399
409 } // namespace browser_sync 400 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/extension_model_associator.h ('k') | chrome/browser/sync/glue/model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698