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/browser/importer/importer.h" | 5 #include "chrome/browser/importer/importer.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/thread.h" | 8 #include "base/thread.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 NULL, | 196 NULL, |
197 l10n_util::GetString(IDS_IMPORTER_GOOGLE_LOGIN_TEXT).c_str(), | 197 l10n_util::GetString(IDS_IMPORTER_GOOGLE_LOGIN_TEXT).c_str(), |
198 L"", | 198 L"", |
199 MB_OK | MB_TOPMOST); | 199 MB_OK | MB_TOPMOST); |
200 | 200 |
201 GURL url("https://www.google.com/accounts/ServiceLogin"); | 201 GURL url("https://www.google.com/accounts/ServiceLogin"); |
202 BrowsingInstance* instance = new BrowsingInstance(writer_->profile()); | 202 BrowsingInstance* instance = new BrowsingInstance(writer_->profile()); |
203 SiteInstance* site = instance->GetSiteInstanceForURL(url); | 203 SiteInstance* site = instance->GetSiteInstanceForURL(url); |
204 Browser* browser = BrowserList::GetLastActive(); | 204 Browser* browser = BrowserList::GetLastActive(); |
205 browser->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1, | 205 browser->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1, |
206 TabStripModel::ADD_SELECTED, site, std::string()); | 206 TabStripModel::ADD_SELECTED, site, std::string(), |
| 207 NULL); |
207 | 208 |
208 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( | 209 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( |
209 this, &ImporterHost::OnLockViewEnd, false)); | 210 this, &ImporterHost::OnLockViewEnd, false)); |
210 | 211 |
211 is_source_readable_ = false; | 212 is_source_readable_ = false; |
212 } | 213 } |
213 } | 214 } |
214 #endif | 215 #endif |
215 | 216 |
216 CheckForLoadedModels(items); | 217 CheckForLoadedModels(items); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 template_url_vec.reserve(template_urls.size()); | 588 template_url_vec.reserve(template_urls.size()); |
588 std::vector<TemplateURL>::const_iterator iter; | 589 std::vector<TemplateURL>::const_iterator iter; |
589 for (iter = template_urls.begin(); | 590 for (iter = template_urls.begin(); |
590 iter != template_urls.end(); | 591 iter != template_urls.end(); |
591 ++iter) { | 592 ++iter) { |
592 template_url_vec.push_back(new TemplateURL(*iter)); | 593 template_url_vec.push_back(new TemplateURL(*iter)); |
593 } | 594 } |
594 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 595 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
595 unique_on_host_and_path); | 596 unique_on_host_and_path); |
596 } | 597 } |
OLD | NEW |