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

Side by Side Diff: components/toolbar/test_toolbar_model.cc

Issue 2399333002: Revert of Delete pre-MD code from OmniboxResultView (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/toolbar/test_toolbar_model.h ('k') | components/toolbar/toolbar_model.h » ('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 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 "components/toolbar/test_toolbar_model.h" 5 #include "components/toolbar/test_toolbar_model.h"
6 6
7 #include "components/grit/components_scaled_resources.h"
7 #include "ui/gfx/vector_icons_public.h" 8 #include "ui/gfx/vector_icons_public.h"
8 9
9 TestToolbarModel::TestToolbarModel() 10 TestToolbarModel::TestToolbarModel()
10 : security_level_(security_state::SecurityStateModel::NONE), 11 : security_level_(security_state::SecurityStateModel::NONE),
11 #if defined(TOOLKIT_VIEWS) 12 #if defined(TOOLKIT_VIEWS)
12 icon_(gfx::VectorIconId::LOCATION_BAR_HTTP), 13 icon_(gfx::VectorIconId::LOCATION_BAR_HTTP),
13 #else 14 #else
14 icon_(gfx::VectorIconId::VECTOR_ICON_NONE), 15 icon_(gfx::VectorIconId::VECTOR_ICON_NONE),
15 #endif 16 #endif
16 should_display_url_(true) { 17 should_display_url_(true) {
17 } 18 }
18 19
19 TestToolbarModel::~TestToolbarModel() {} 20 TestToolbarModel::~TestToolbarModel() {}
20 21
21 base::string16 TestToolbarModel::GetFormattedURL(size_t* prefix_end) const { 22 base::string16 TestToolbarModel::GetFormattedURL(size_t* prefix_end) const {
22 return text_; 23 return text_;
23 } 24 }
24 25
25 GURL TestToolbarModel::GetURL() const { 26 GURL TestToolbarModel::GetURL() const {
26 return url_; 27 return url_;
27 } 28 }
28 29
29 security_state::SecurityStateModel::SecurityLevel 30 security_state::SecurityStateModel::SecurityLevel
30 TestToolbarModel::GetSecurityLevel(bool ignore_editing) const { 31 TestToolbarModel::GetSecurityLevel(bool ignore_editing) const {
31 return security_level_; 32 return security_level_;
32 } 33 }
33 34
35 int TestToolbarModel::GetIcon() const {
36 // This placeholder implementation should be removed when MD is default.
37 return IDR_LOCATION_BAR_HTTP;
38 }
39
34 gfx::VectorIconId TestToolbarModel::GetVectorIcon() const { 40 gfx::VectorIconId TestToolbarModel::GetVectorIcon() const {
35 return icon_; 41 return icon_;
36 } 42 }
37 43
38 base::string16 TestToolbarModel::GetSecureVerboseText() const { 44 base::string16 TestToolbarModel::GetSecureVerboseText() const {
39 return base::string16(); 45 return base::string16();
40 } 46 }
41 47
42 base::string16 TestToolbarModel::GetEVCertName() const { 48 base::string16 TestToolbarModel::GetEVCertName() const {
43 return (security_level_ == security_state::SecurityStateModel::EV_SECURE) 49 return (security_level_ == security_state::SecurityStateModel::EV_SECURE)
44 ? ev_cert_name_ 50 ? ev_cert_name_
45 : base::string16(); 51 : base::string16();
46 } 52 }
47 53
48 bool TestToolbarModel::ShouldDisplayURL() const { 54 bool TestToolbarModel::ShouldDisplayURL() const {
49 return should_display_url_; 55 return should_display_url_;
50 } 56 }
OLDNEW
« no previous file with comments | « components/toolbar/test_toolbar_model.h ('k') | components/toolbar/toolbar_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698