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

Side by Side Diff: chrome/browser/importer/profile_writer.cc

Issue 338363004: Remove Profile* from TemplateURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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/importer/profile_writer.h" 5 #include "chrome/browser/importer/profile_writer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // search providers (such as two Googles, or two Yahoos) as well as making 311 // search providers (such as two Googles, or two Yahoos) as well as making
312 // sure the search engines we provide aren't replaced by those from the 312 // sure the search engines we provide aren't replaced by those from the
313 // imported browser. 313 // imported browser.
314 if (unique_on_host_and_path && 314 if (unique_on_host_and_path &&
315 (host_path_map.find(BuildHostPathKey( 315 (host_path_map.find(BuildHostPathKey(
316 *i, model->search_terms_data(), true)) != host_path_map.end())) 316 *i, model->search_terms_data(), true)) != host_path_map.end()))
317 continue; 317 continue;
318 318
319 // Only add valid TemplateURLs to the model. 319 // Only add valid TemplateURLs to the model.
320 if ((*i)->url_ref().IsValid(model->search_terms_data())) { 320 if ((*i)->url_ref().IsValid(model->search_terms_data())) {
321 model->AddAndSetProfile(*i, profile_); // Takes ownership. 321 model->Add(*i); // Takes ownership.
322 *i = NULL; // Prevent the vector from deleting *i later. 322 *i = NULL; // Prevent the vector from deleting *i later.
323 } 323 }
324 } 324 }
325 } 325 }
326 326
327 ProfileWriter::~ProfileWriter() {} 327 ProfileWriter::~ProfileWriter() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698