| OLD | NEW |
| 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/test/live_sync/bookmark_model_verifier.h" | 5 #include "chrome/test/live_sync/bookmark_model_verifier.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 #include <stack> | 8 #include <stack> |
| 9 | 9 |
| 10 #include "app/tree_node_iterator.h" | 10 #include "app/tree_node_iterator.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return NULL; | 196 return NULL; |
| 197 ExpectBookmarkInfoMatch(v_node, result); | 197 ExpectBookmarkInfoMatch(v_node, result); |
| 198 return result; | 198 return result; |
| 199 } | 199 } |
| 200 | 200 |
| 201 void BookmarkModelVerifier::SetTitle(BookmarkModel* model, | 201 void BookmarkModelVerifier::SetTitle(BookmarkModel* model, |
| 202 const BookmarkNode* node, | 202 const BookmarkNode* node, |
| 203 const wstring& title) { | 203 const wstring& title) { |
| 204 const BookmarkNode* v_node = NULL; | 204 const BookmarkNode* v_node = NULL; |
| 205 FindNodeInVerifier(model, node, &v_node); | 205 FindNodeInVerifier(model, node, &v_node); |
| 206 model->SetTitle(node, title); | 206 model->SetTitle(node, WideToUTF16Hack(title)); |
| 207 model_->SetTitle(v_node, title); | 207 model_->SetTitle(v_node, WideToUTF16Hack(title)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void BookmarkModelVerifier::Move(BookmarkModel* model, const BookmarkNode* node, | 210 void BookmarkModelVerifier::Move(BookmarkModel* model, const BookmarkNode* node, |
| 211 const BookmarkNode* new_parent, int index) { | 211 const BookmarkNode* new_parent, int index) { |
| 212 const BookmarkNode* v_new_parent = NULL; | 212 const BookmarkNode* v_new_parent = NULL; |
| 213 const BookmarkNode* v_node = NULL; | 213 const BookmarkNode* v_node = NULL; |
| 214 FindNodeInVerifier(model, new_parent, &v_new_parent); | 214 FindNodeInVerifier(model, new_parent, &v_new_parent); |
| 215 FindNodeInVerifier(model, node, &v_node); | 215 FindNodeInVerifier(model, node, &v_node); |
| 216 model->Move(node, new_parent, index); | 216 model->Move(node, new_parent, index); |
| 217 model_->Move(v_node, v_new_parent, index); | 217 model_->Move(v_node, v_new_parent, index); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 const BookmarkNode* v_node = NULL; | 250 const BookmarkNode* v_node = NULL; |
| 251 FindNodeInVerifier(model, node, &v_node); | 251 FindNodeInVerifier(model, node, &v_node); |
| 252 const BookmarkNode* result = bookmark_utils::ApplyEditsWithNoGroupChange( | 252 const BookmarkNode* result = bookmark_utils::ApplyEditsWithNoGroupChange( |
| 253 model, node->GetParent(), BookmarkEditor::EditDetails(node), | 253 model, node->GetParent(), BookmarkEditor::EditDetails(node), |
| 254 node->GetTitleAsString16(), new_url); | 254 node->GetTitleAsString16(), new_url); |
| 255 bookmark_utils::ApplyEditsWithNoGroupChange(model_, v_node->GetParent(), | 255 bookmark_utils::ApplyEditsWithNoGroupChange(model_, v_node->GetParent(), |
| 256 BookmarkEditor::EditDetails(v_node), v_node->GetTitleAsString16(), | 256 BookmarkEditor::EditDetails(v_node), v_node->GetTitleAsString16(), |
| 257 new_url); | 257 new_url); |
| 258 return result; | 258 return result; |
| 259 } | 259 } |
| OLD | NEW |