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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « chrome/browser/history/top_sites.cc ('k') | chrome/browser/infobars/infobar_tab_helper.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/bookmarks/bookmark_model.h" 15 #include "chrome/browser/bookmarks/bookmark_model.h"
16 #include "chrome/browser/password_manager/password_store.h" 16 #include "chrome/browser/password_manager/password_store.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/search_engines/template_url.h" 19 #include "chrome/browser/search_engines/template_url.h"
20 #include "chrome/browser/search_engines/template_url_service.h" 20 #include "chrome/browser/search_engines/template_url_service.h"
21 #include "chrome/browser/search_engines/template_url_service_factory.h" 21 #include "chrome/browser/search_engines/template_url_service_factory.h"
22 #include "chrome/common/chrome_notification_types.h" 22 #include "chrome/common/chrome_notification_types.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "content/common/notification_service.h"
25 24
26 namespace { 25 namespace {
27 26
28 // Generates a unique folder name. If |folder_name| is not unique, then this 27 // Generates a unique folder name. If |folder_name| is not unique, then this
29 // repeatedly tests for '|folder_name| + (i)' until a unique name is found. 28 // repeatedly tests for '|folder_name| + (i)' until a unique name is found.
30 string16 GenerateUniqueFolderName(BookmarkModel* model, 29 string16 GenerateUniqueFolderName(BookmarkModel* model,
31 const string16& folder_name) { 30 const string16& folder_name) {
32 // Build a set containing the bookmark bar folder names. 31 // Build a set containing the bookmark bar folder names.
33 std::set<string16> existing_folder_names; 32 std::set<string16> existing_folder_names;
34 const BookmarkNode* bookmark_bar = model->bookmark_bar_node(); 33 const BookmarkNode* bookmark_bar = model->bookmark_bar_node();
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (default_keyword && TemplateURL::SupportsReplacement(t_url)) 327 if (default_keyword && TemplateURL::SupportsReplacement(t_url))
329 model->SetDefaultSearchProvider(t_url); 328 model->SetDefaultSearchProvider(t_url);
330 } else { 329 } else {
331 // Don't add invalid TemplateURLs to the model. 330 // Don't add invalid TemplateURLs to the model.
332 delete t_url; 331 delete t_url;
333 } 332 }
334 } 333 }
335 } 334 }
336 335
337 ProfileWriter::~ProfileWriter() {} 336 ProfileWriter::~ProfileWriter() {}
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites.cc ('k') | chrome/browser/infobars/infobar_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698