OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/page_info_model.h" | 5 #include "chrome/browser/page_info_model.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 icon_id, | 262 icon_id, |
263 headline, | 263 headline, |
264 description, | 264 description, |
265 SECTION_INFO_CONNECTION)); | 265 SECTION_INFO_CONNECTION)); |
266 } | 266 } |
267 | 267 |
268 // Request the number of visits. | 268 // Request the number of visits. |
269 HistoryService* history = profile->GetHistoryService( | 269 HistoryService* history = profile->GetHistoryService( |
270 Profile::EXPLICIT_ACCESS); | 270 Profile::EXPLICIT_ACCESS); |
271 if (show_history && history) { | 271 if (show_history && history) { |
272 history->GetVisitCountToHost( | 272 history->GetVisibleVisitCountToHost( |
273 url, | 273 url, |
274 &request_consumer_, | 274 &request_consumer_, |
275 NewCallback(this, &PageInfoModel::OnGotVisitCountToHost)); | 275 NewCallback(this, &PageInfoModel::OnGotVisitCountToHost)); |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 PageInfoModel::~PageInfoModel() {} | 279 PageInfoModel::~PageInfoModel() {} |
280 | 280 |
281 int PageInfoModel::GetSectionCount() { | 281 int PageInfoModel::GetSectionCount() { |
282 return sections_.size(); | 282 return sections_.size(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 void PageInfoModel::Init() { | 338 void PageInfoModel::Init() { |
339 // Loads the icons into the vector. The order must match the SectionStateIcon | 339 // Loads the icons into the vector. The order must match the SectionStateIcon |
340 // enum. | 340 // enum. |
341 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 341 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
342 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_GOOD)); | 342 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_GOOD)); |
343 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MINOR)); | 343 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MINOR)); |
344 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MAJOR)); | 344 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MAJOR)); |
345 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_BAD)); | 345 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_BAD)); |
346 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_INFO)); | 346 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_INFO)); |
347 } | 347 } |
OLD | NEW |