OLD | NEW |
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/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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 if (!description.empty()) { | 270 if (!description.empty()) { |
271 sections_.push_back(SectionInfo( | 271 sections_.push_back(SectionInfo( |
272 icon_id, | 272 icon_id, |
273 headline, | 273 headline, |
274 description, | 274 description, |
275 SECTION_INFO_CONNECTION)); | 275 SECTION_INFO_CONNECTION)); |
276 } | 276 } |
277 | 277 |
278 // Request the number of visits. | 278 // Request the number of visits. |
279 HistoryService* history = HistoryServiceFactory::GetForProfile( | 279 HistoryService* history = HistoryServiceFactory::GetForProfile( |
280 profile, Profile::EXPLICIT_ACCESS); | 280 profile, Profile::EXPLICIT_ACCESS).get(); |
281 if (show_history && history) { | 281 if (show_history && history) { |
282 history->GetVisibleVisitCountToHost( | 282 history->GetVisibleVisitCountToHost( |
283 url, | 283 url, |
284 &request_consumer_, | 284 &request_consumer_, |
285 base::Bind(&PageInfoModel::OnGotVisitCountToHost, | 285 base::Bind(&PageInfoModel::OnGotVisitCountToHost, |
286 base::Unretained(this))); | 286 base::Unretained(this))); |
287 } | 287 } |
288 | 288 |
289 if (ssl.cert_id) { | 289 if (ssl.cert_id) { |
290 certificate_label_ = l10n_util::GetStringUTF16( | 290 certificate_label_ = l10n_util::GetStringUTF16( |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // Loads the icons into the vector. The order must match the SectionStateIcon | 359 // Loads the icons into the vector. The order must match the SectionStateIcon |
360 // enum. | 360 // enum. |
361 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 361 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
362 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_GOOD)); | 362 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_GOOD)); |
363 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MINOR)); | 363 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MINOR)); |
364 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MAJOR)); | 364 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MAJOR)); |
365 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_BAD)); | 365 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_BAD)); |
366 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_INFO)); | 366 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_INFO)); |
367 icons_.push_back(&rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_26)); | 367 icons_.push_back(&rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_26)); |
368 } | 368 } |
OLD | NEW |