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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/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
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(UTF8ToWide(engine)); 398 file = base::FilePath(base::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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/history/thumbnail_database.cc ('k') | chrome/browser/importer/firefox_importer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698