Commit eed164bb authored by bulach@chromium.org's avatar bulach@chromium.org

Adds "Certificate Information" label for page_info_model.

On android, we have a slightly different design
for the page info requiring this extra label.

BUG=
TEST=


Review URL: http://codereview.chromium.org/9537015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124646 0039d316-1c4b-4281-b951-d872f2087c98
parent 5fe4a49b
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -287,6 +287,11 @@ PageInfoModel::PageInfoModel(Profile* profile, ...@@ -287,6 +287,11 @@ PageInfoModel::PageInfoModel(Profile* profile,
base::Bind(&PageInfoModel::OnGotVisitCountToHost, base::Bind(&PageInfoModel::OnGotVisitCountToHost,
base::Unretained(this))); base::Unretained(this)));
} }
if (ssl.cert_id) {
certificate_label_ = l10n_util::GetStringUTF16(
IDS_PAGEINFO_CERT_INFO_BUTTON);
}
} }
PageInfoModel::~PageInfoModel() {} PageInfoModel::~PageInfoModel() {}
...@@ -344,6 +349,10 @@ void PageInfoModel::OnGotVisitCountToHost(HistoryService::Handle handle, ...@@ -344,6 +349,10 @@ void PageInfoModel::OnGotVisitCountToHost(HistoryService::Handle handle,
observer_->OnPageInfoModelChanged(); observer_->OnPageInfoModelChanged();
} }
string16 PageInfoModel::GetCertificateLabel() const {
return certificate_label_;
}
PageInfoModel::PageInfoModel() : observer_(NULL) { PageInfoModel::PageInfoModel() : observer_(NULL) {
Init(); Init();
} }
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -95,6 +95,9 @@ class PageInfoModel { ...@@ -95,6 +95,9 @@ class PageInfoModel {
int count, int count,
base::Time first_visit); base::Time first_visit);
// Returns the label for the "Certificate Information", if needed.
string16 GetCertificateLabel() const;
protected: protected:
// Testing constructor. DO NOT USE. // Testing constructor. DO NOT USE.
PageInfoModel(); PageInfoModel();
...@@ -112,6 +115,9 @@ class PageInfoModel { ...@@ -112,6 +115,9 @@ class PageInfoModel {
// Used to request number of visits. // Used to request number of visits.
CancelableRequestConsumer request_consumer_; CancelableRequestConsumer request_consumer_;
// Label for "Certificate Information", if needed.
string16 certificate_label_;
private: private:
DISALLOW_COPY_AND_ASSIGN(PageInfoModel); DISALLOW_COPY_AND_ASSIGN(PageInfoModel);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment