| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/toolbar_importer.h" | 5 #include "chrome/browser/importer/toolbar_importer.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" |
| 9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 10 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
| 11 #include "chrome/browser/first_run.h" | 12 #include "chrome/browser/first_run.h" |
| 12 #include "chrome/common/l10n_util.h" | |
| 13 #include "chrome/common/libxml_utils.h" | 13 #include "chrome/common/libxml_utils.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 15 #include "net/base/cookie_monster.h" | 15 #include "net/base/cookie_monster.h" |
| 16 #include "net/base/data_url.h" | 16 #include "net/base/data_url.h" |
| 17 #include "net/url_request/url_request_context.h" | 17 #include "net/url_request/url_request_context.h" |
| 18 | 18 |
| 19 // | 19 // |
| 20 // ToolbarImporterUtils | 20 // ToolbarImporterUtils |
| 21 // | 21 // |
| 22 static const char* kGoogleDomainUrl = "http://.google.com/"; | 22 static const char* kGoogleDomainUrl = "http://.google.com/"; |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) { | 583 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) { |
| 584 if (!bookmarks.empty() && !cancelled()) { | 584 if (!bookmarks.empty() && !cancelled()) { |
| 585 int options = ProfileWriter::ADD_IF_UNIQUE | | 585 int options = ProfileWriter::ADD_IF_UNIQUE | |
| 586 (first_run() ? ProfileWriter::FIRST_RUN : 0); | 586 (first_run() ? ProfileWriter::FIRST_RUN : 0); |
| 587 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_, | 587 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_, |
| 588 &ProfileWriter::AddBookmarkEntry, bookmarks, | 588 &ProfileWriter::AddBookmarkEntry, bookmarks, |
| 589 l10n_util::GetString(IDS_BOOKMARK_GROUP_FROM_GOOGLE_TOOLBAR), | 589 l10n_util::GetString(IDS_BOOKMARK_GROUP_FROM_GOOGLE_TOOLBAR), |
| 590 options)); | 590 options)); |
| 591 } | 591 } |
| 592 } | 592 } |
| OLD | NEW |