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

Side by Side Diff: chrome/browser/history/history_publisher_win.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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
« no previous file with comments | « chrome/browser/gpu_process_host_ui_shim.cc ('k') | chrome/browser/history/history_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 // Peruse the registry for Indexer to instantiate and store in |indexers_|. 100 // Peruse the registry for Indexer to instantiate and store in |indexers_|.
101 // Return true if we found at least one indexer object. We look both in HKCU 101 // Return true if we found at least one indexer object. We look both in HKCU
102 // and HKLM. 102 // and HKLM.
103 bool HistoryPublisher::ReadRegisteredIndexersFromRegistry() { 103 bool HistoryPublisher::ReadRegisteredIndexersFromRegistry() {
104 AddRegisteredIndexers(HKEY_CURRENT_USER, 104 AddRegisteredIndexers(HKEY_CURRENT_USER,
105 kRegKeyRegisteredIndexersInfo, &indexers_); 105 kRegKeyRegisteredIndexersInfo, &indexers_);
106 AddRegisteredIndexers(HKEY_LOCAL_MACHINE, 106 AddRegisteredIndexers(HKEY_LOCAL_MACHINE,
107 kRegKeyRegisteredIndexersInfo, &indexers_); 107 kRegKeyRegisteredIndexersInfo, &indexers_);
108 return indexers_.size() > 0; 108 return !indexers_.empty();
109 } 109 }
110 110
111 void HistoryPublisher::PublishDataToIndexers(const PageData& page_data) 111 void HistoryPublisher::PublishDataToIndexers(const PageData& page_data)
112 const { 112 const {
113 double var_time = TimeToUTCVariantTime(page_data.time); 113 double var_time = TimeToUTCVariantTime(page_data.time);
114 114
115 CComSafeArray<unsigned char> thumbnail_arr; 115 CComSafeArray<unsigned char> thumbnail_arr;
116 if (page_data.thumbnail) { 116 if (page_data.thumbnail) {
117 for (size_t i = 0; i < page_data.thumbnail->size(); ++i) 117 for (size_t i = 0; i < page_data.thumbnail->size(); ++i)
118 thumbnail_arr.Add((*page_data.thumbnail)[i]); 118 thumbnail_arr.Add((*page_data.thumbnail)[i]);
(...skipping 20 matching lines...) Expand all
139 base::win::ScopedVariant var_begin_time(TimeToUTCVariantTime(begin_time), 139 base::win::ScopedVariant var_begin_time(TimeToUTCVariantTime(begin_time),
140 VT_DATE); 140 VT_DATE);
141 base::win::ScopedVariant var_end_time(TimeToUTCVariantTime(end_time), 141 base::win::ScopedVariant var_end_time(TimeToUTCVariantTime(end_time),
142 VT_DATE); 142 VT_DATE);
143 for (size_t i = 0; i < indexers_.size(); ++i) { 143 for (size_t i = 0; i < indexers_.size(); ++i) {
144 indexers_[i]->DeleteUserHistoryBetween(var_begin_time, var_end_time); 144 indexers_[i]->DeleteUserHistoryBetween(var_begin_time, var_end_time);
145 } 145 }
146 } 146 }
147 147
148 } // namespace history 148 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/gpu_process_host_ui_shim.cc ('k') | chrome/browser/history/history_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698