| OLD | NEW |
| 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/firefox3_importer.h" | 5 #include "chrome/browser/importer/firefox3_importer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 if (index != std::string::npos) { | 388 if (index != std::string::npos) { |
| 389 // Remove '[app]/'. | 389 // Remove '[app]/'. |
| 390 file = app_path.AppendASCII(engine.substr(index + kAppPrefix.length())); | 390 file = app_path.AppendASCII(engine.substr(index + kAppPrefix.length())); |
| 391 } else if ((index = engine.find(kProfilePrefix)) != std::string::npos) { | 391 } else if ((index = engine.find(kProfilePrefix)) != std::string::npos) { |
| 392 // Remove '[profile]/'. | 392 // Remove '[profile]/'. |
| 393 file = profile_path.AppendASCII( | 393 file = profile_path.AppendASCII( |
| 394 engine.substr(index + kProfilePrefix.length())); | 394 engine.substr(index + kProfilePrefix.length())); |
| 395 } else { | 395 } else { |
| 396 // Looks like absolute path to the file. | 396 // Looks like absolute path to the file. |
| 397 #if defined(OS_WIN) | 397 #if defined(OS_WIN) |
| 398 file = base::FilePath(base::UTF8ToWide(engine)); | 398 file = base::FilePath(UTF8ToWide(engine)); |
| 399 #else | 399 #else |
| 400 file = base::FilePath(engine); | 400 file = base::FilePath(engine); |
| 401 #endif | 401 #endif |
| 402 } | 402 } |
| 403 files->push_back(file); | 403 files->push_back(file); |
| 404 } while (s.Step() && !cancelled()); | 404 } while (s.Step() && !cancelled()); |
| 405 } | 405 } |
| 406 | 406 |
| 407 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 407 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 408 // Ubuntu-flavored Firefox3 supports locale-specific search engines via | 408 // Ubuntu-flavored Firefox3 supports locale-specific search engines via |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 | 562 |
| 563 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) | 563 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) |
| 564 continue; // Unable to decode. | 564 continue; // Unable to decode. |
| 565 | 565 |
| 566 usage.urls = i->second; | 566 usage.urls = i->second; |
| 567 favicons->push_back(usage); | 567 favicons->push_back(usage); |
| 568 } | 568 } |
| 569 s.Reset(true); | 569 s.Reset(true); |
| 570 } | 570 } |
| 571 } | 571 } |
| OLD | NEW |