| 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/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/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "chrome/browser/importer/firefox2_importer.h" | 12 #include "chrome/browser/importer/firefox2_importer.h" |
| 13 #include "chrome/browser/importer/firefox_importer_utils.h" | 13 #include "chrome/browser/importer/firefox_importer_utils.h" |
| 14 #include "chrome/common/l10n_util.h" | 14 #include "chrome/common/l10n_util.h" |
| 15 #include "chrome/common/time_format.h" | 15 #include "chrome/common/time_format.h" |
| 16 #include "generated_resources.h" | 16 #include "generated_resources.h" |
| 17 | 17 |
| 18 using base::Time; |
| 19 |
| 18 // Wraps the function sqlite3_close() in a class that is | 20 // Wraps the function sqlite3_close() in a class that is |
| 19 // used in scoped_ptr_malloc. | 21 // used in scoped_ptr_malloc. |
| 20 | 22 |
| 21 namespace { | 23 namespace { |
| 22 | 24 |
| 23 class DBClose { | 25 class DBClose { |
| 24 public: | 26 public: |
| 25 inline void operator()(sqlite3* x) const { | 27 inline void operator()(sqlite3* x) const { |
| 26 sqlite3_close(x); | 28 sqlite3_close(x); |
| 27 } | 29 } |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 | 494 |
| 493 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data)) | 495 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data)) |
| 494 continue; // Unable to decode. | 496 continue; // Unable to decode. |
| 495 | 497 |
| 496 usage.urls = i->second; | 498 usage.urls = i->second; |
| 497 favicons->push_back(usage); | 499 favicons->push_back(usage); |
| 498 } | 500 } |
| 499 s.reset(); | 501 s.reset(); |
| 500 } | 502 } |
| 501 } | 503 } |
| 502 | |
| OLD | NEW |