OLD | NEW |
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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/history/history_publisher.h" | 5 #include "chrome/browser/history/history_publisher.h" |
6 | 6 |
7 #include <atlsafe.h> | 7 #include <atlsafe.h> |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 #include <oleauto.h> | 9 #include <oleauto.h> |
10 #include <wtypes.h> | 10 #include <wtypes.h> |
11 | 11 |
12 #include "base/registry.h" | 12 #include "base/registry.h" |
13 #include "base/scoped_bstr_win.h" | 13 #include "base/scoped_bstr_win.h" |
14 #include "base/scoped_comptr_win.h" | 14 #include "base/scoped_comptr_win.h" |
15 #include "base/scoped_variant_win.h" | 15 #include "base/scoped_variant_win.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "base/utf_string_conversions.h" |
18 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
22 // Instantiates a IChromeHistoryIndexer COM object. Takes a COM class id | 23 // Instantiates a IChromeHistoryIndexer COM object. Takes a COM class id |
23 // in |name| and returns the object in |indexer|. Returns false if the | 24 // in |name| and returns the object in |indexer|. Returns false if the |
24 // operation fails. | 25 // operation fails. |
25 bool CoCreateIndexerFromName(const wchar_t* name, | 26 bool CoCreateIndexerFromName(const wchar_t* name, |
26 IChromeHistoryIndexer** indexer) { | 27 IChromeHistoryIndexer** indexer) { |
27 CLSID clsid; | 28 CLSID clsid; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 const base::Time& end_time) | 131 const base::Time& end_time) |
131 const { | 132 const { |
132 ScopedVariant var_begin_time(TimeToUTCVariantTime(begin_time), VT_DATE); | 133 ScopedVariant var_begin_time(TimeToUTCVariantTime(begin_time), VT_DATE); |
133 ScopedVariant var_end_time(TimeToUTCVariantTime(end_time), VT_DATE); | 134 ScopedVariant var_end_time(TimeToUTCVariantTime(end_time), VT_DATE); |
134 for (size_t i = 0; i < indexers_.size(); ++i) { | 135 for (size_t i = 0; i < indexers_.size(); ++i) { |
135 indexers_[i]->DeleteUserHistoryBetween(var_begin_time, var_end_time); | 136 indexers_[i]->DeleteUserHistoryBetween(var_begin_time, var_end_time); |
136 } | 137 } |
137 } | 138 } |
138 | 139 |
139 } // namespace history | 140 } // namespace history |
OLD | NEW |