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

Side by Side Diff: chrome/browser/ui/toolbar/test_toolbar_model.cc

Issue 1314843007: Refactor connection_security into SecurityStateModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: create SecurityStateModel for chromeos login webview Created 5 years, 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/toolbar/test_toolbar_model.h" 5 #include "chrome/browser/ui/toolbar/test_toolbar_model.h"
6 6
7 #include "grit/components_scaled_resources.h" 7 #include "grit/components_scaled_resources.h"
8 8
9 TestToolbarModel::TestToolbarModel() 9 TestToolbarModel::TestToolbarModel()
10 : ChromeToolbarModel(), 10 : ChromeToolbarModel(),
11 perform_search_term_replacement_(false), 11 perform_search_term_replacement_(false),
12 security_level_(connection_security::NONE), 12 security_level_(SecurityStateModel::NONE),
13 icon_(IDR_LOCATION_BAR_HTTP), 13 icon_(IDR_LOCATION_BAR_HTTP),
14 should_display_url_(true) {} 14 should_display_url_(true) {}
15 15
16 TestToolbarModel::~TestToolbarModel() {} 16 TestToolbarModel::~TestToolbarModel() {}
17 17
18 base::string16 TestToolbarModel::GetText() const { 18 base::string16 TestToolbarModel::GetText() const {
19 return text_; 19 return text_;
20 } 20 }
21 21
22 base::string16 TestToolbarModel::GetFormattedURL(size_t* prefix_end) const { 22 base::string16 TestToolbarModel::GetFormattedURL(size_t* prefix_end) const {
23 return text_; 23 return text_;
24 } 24 }
25 25
26 base::string16 TestToolbarModel::GetCorpusNameForMobile() const { 26 base::string16 TestToolbarModel::GetCorpusNameForMobile() const {
27 return base::string16(); 27 return base::string16();
28 } 28 }
29 29
30 GURL TestToolbarModel::GetURL() const { 30 GURL TestToolbarModel::GetURL() const {
31 return url_; 31 return url_;
32 } 32 }
33 33
34 bool TestToolbarModel::WouldPerformSearchTermReplacement( 34 bool TestToolbarModel::WouldPerformSearchTermReplacement(
35 bool ignore_editing) const { 35 bool ignore_editing) const {
36 return perform_search_term_replacement_; 36 return perform_search_term_replacement_;
37 } 37 }
38 38
39 connection_security::SecurityLevel TestToolbarModel::GetSecurityLevel( 39 SecurityStateModel::SecurityLevel TestToolbarModel::GetSecurityLevel(
40 bool ignore_editing) const { 40 bool ignore_editing) const {
41 return security_level_; 41 return security_level_;
42 } 42 }
43 43
44 int TestToolbarModel::GetIcon() const { 44 int TestToolbarModel::GetIcon() const {
45 return icon_; 45 return icon_;
46 } 46 }
47 47
48 base::string16 TestToolbarModel::GetEVCertName() const { 48 base::string16 TestToolbarModel::GetEVCertName() const {
49 return (security_level_ == connection_security::EV_SECURE) ? ev_cert_name_ 49 return (security_level_ == SecurityStateModel::EV_SECURE) ? ev_cert_name_
50 : base::string16(); 50 : base::string16();
51 } 51 }
52 52
53 bool TestToolbarModel::ShouldDisplayURL() const { 53 bool TestToolbarModel::ShouldDisplayURL() const {
54 return should_display_url_; 54 return should_display_url_;
55 } 55 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/test_toolbar_model.h ('k') | chrome/browser/ui/toolbar/toolbar_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698