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

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

Issue 12820010: sync: Define histogram ints for model types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove comment Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/glue/data_type_controller.cc » ('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 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 #include "chrome/browser/sync/glue/bookmark_model_associator.h" 5 #include "chrome/browser/sync/glue/bookmark_model_associator.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 699
700 void BookmarkModelAssociator::CheckModelSyncState() const { 700 void BookmarkModelAssociator::CheckModelSyncState() const {
701 std::string version_str; 701 std::string version_str;
702 if (bookmark_model_->root_node()->GetMetaInfo(kBookmarkTransactionVersionKey, 702 if (bookmark_model_->root_node()->GetMetaInfo(kBookmarkTransactionVersionKey,
703 &version_str)) { 703 &version_str)) {
704 syncer::ReadTransaction trans(FROM_HERE, user_share_); 704 syncer::ReadTransaction trans(FROM_HERE, user_share_);
705 int64 native_version; 705 int64 native_version;
706 if (base::StringToInt64(version_str, &native_version) && 706 if (base::StringToInt64(version_str, &native_version) &&
707 native_version != trans.GetModelVersion(syncer::BOOKMARKS)) { 707 native_version != trans.GetModelVersion(syncer::BOOKMARKS)) {
708 UMA_HISTOGRAM_ENUMERATION("Sync.LocalModelOutOfSync", 708 UMA_HISTOGRAM_ENUMERATION("Sync.LocalModelOutOfSync",
709 syncer::BOOKMARKS, syncer::MODEL_TYPE_COUNT); 709 ModelTypeToHistogramInt(syncer::BOOKMARKS),
710 syncer::MODEL_TYPE_COUNT);
710 // Clear version on bookmark model so that we only report error once. 711 // Clear version on bookmark model so that we only report error once.
711 bookmark_model_->DeleteNodeMetaInfo(bookmark_model_->root_node(), 712 bookmark_model_->DeleteNodeMetaInfo(bookmark_model_->root_node(),
712 kBookmarkTransactionVersionKey); 713 kBookmarkTransactionVersionKey);
713 } 714 }
714 } 715 }
715 } 716 }
716 717
717 } // namespace browser_sync 718 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698