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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/typed_url_change_processor.h" 5 #include "chrome/browser/sync/glue/typed_url_change_processor.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 syncer::WriteNode create_node(trans); 161 syncer::WriteNode create_node(trans);
162 syncer::WriteNode::InitUniqueByCreationResult result = 162 syncer::WriteNode::InitUniqueByCreationResult result =
163 create_node.InitUniqueByCreation(syncer::TYPED_URLS, 163 create_node.InitUniqueByCreation(syncer::TYPED_URLS,
164 typed_url_root, tag); 164 typed_url_root, tag);
165 if (result != syncer::WriteNode::INIT_SUCCESS) { 165 if (result != syncer::WriteNode::INIT_SUCCESS) {
166 error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE, 166 error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
167 "Failed to create typed_url sync node."); 167 "Failed to create typed_url sync node.");
168 return false; 168 return false;
169 } 169 }
170 170
171 create_node.SetTitle(UTF8ToWide(tag)); 171 create_node.SetTitle(base::UTF8ToWide(tag));
172 model_associator_->WriteToSyncNode(url, visit_vector, &create_node); 172 model_associator_->WriteToSyncNode(url, visit_vector, &create_node);
173 } 173 }
174 return true; 174 return true;
175 } 175 }
176 176
177 void TypedUrlChangeProcessor::HandleURLsDeleted( 177 void TypedUrlChangeProcessor::HandleURLsDeleted(
178 history::URLsDeletedDetails* details) { 178 history::URLsDeletedDetails* details) {
179 syncer::WriteTransaction trans(FROM_HERE, share_handle()); 179 syncer::WriteTransaction trans(FROM_HERE, share_handle());
180 180
181 // Ignore archivals (we don't want to sync them as deletions, to avoid 181 // Ignore archivals (we don't want to sync them as deletions, to avoid
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 content::Source<Profile>(profile_)); 345 content::Source<Profile>(profile_));
346 notification_registrar_.Remove( 346 notification_registrar_.Remove(
347 this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, 347 this, chrome::NOTIFICATION_HISTORY_URLS_DELETED,
348 content::Source<Profile>(profile_)); 348 content::Source<Profile>(profile_));
349 notification_registrar_.Remove( 349 notification_registrar_.Remove(
350 this, chrome::NOTIFICATION_HISTORY_URL_VISITED, 350 this, chrome::NOTIFICATION_HISTORY_URL_VISITED,
351 content::Source<Profile>(profile_)); 351 content::Source<Profile>(profile_));
352 } 352 }
353 353
354 } // namespace browser_sync 354 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/tab_node_pool.cc ('k') | chrome/browser/sync/glue/typed_url_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698