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

Side by Side Diff: chrome/browser/managed_mode/managed_mode_navigation_observer.cc

Issue 17320005: Update strings to match the final spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Null-check the signin manager for CrOS Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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/managed_mode/managed_mode_navigation_observer.h" 5 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return false; 118 return false;
119 } 119 }
120 120
121 void ManagedModeWarningInfobarDelegate::InfoBarDismissed() { 121 void ManagedModeWarningInfobarDelegate::InfoBarDismissed() {
122 ManagedModeNavigationObserver* observer = 122 ManagedModeNavigationObserver* observer =
123 ManagedModeNavigationObserver::FromWebContents(web_contents()); 123 ManagedModeNavigationObserver::FromWebContents(web_contents());
124 observer->WarnInfobarDismissed(); 124 observer->WarnInfobarDismissed();
125 } 125 }
126 126
127 string16 ManagedModeWarningInfobarDelegate::GetMessageText() const { 127 string16 ManagedModeWarningInfobarDelegate::GetMessageText() const {
128 return l10n_util::GetStringUTF16(IDS_MANAGED_MODE_WARNING_MESSAGE); 128 return l10n_util::GetStringUTF16(IDS_MANAGED_USER_WARN_INFOBAR_MESSAGE);
129 } 129 }
130 130
131 int ManagedModeWarningInfobarDelegate::GetButtons() const { 131 int ManagedModeWarningInfobarDelegate::GetButtons() const {
132 return BUTTON_OK; 132 return BUTTON_OK;
133 } 133 }
134 134
135 string16 ManagedModeWarningInfobarDelegate::GetButtonLabel( 135 string16 ManagedModeWarningInfobarDelegate::GetButtonLabel(
136 InfoBarButton button) const { 136 InfoBarButton button) const {
137 DCHECK_EQ(BUTTON_OK, button); 137 DCHECK_EQ(BUTTON_OK, button);
138 return l10n_util::GetStringUTF16(IDS_MANAGED_MODE_GO_BACK_ACTION); 138 return l10n_util::GetStringUTF16(IDS_MANAGED_USER_WARN_INFOBAR_GO_BACK);
139 } 139 }
140 140
141 bool ManagedModeWarningInfobarDelegate::Accept() { 141 bool ManagedModeWarningInfobarDelegate::Accept() {
142 GoBackToSafety(web_contents()); 142 GoBackToSafety(web_contents());
143 143
144 return false; 144 return false;
145 } 145 }
146 146
147 bool ManagedModeWarningInfobarDelegate::Cancel() { 147 bool ManagedModeWarningInfobarDelegate::Cancel() {
148 NOTREACHED(); 148 NOTREACHED();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 // |history_service| is null if saving history is disabled. 250 // |history_service| is null if saving history is disabled.
251 if (history_service) 251 if (history_service)
252 history_service->AddPage(add_page_args); 252 history_service->AddPage(add_page_args);
253 253
254 scoped_ptr<NavigationEntry> entry(NavigationEntry::Create()); 254 scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
255 entry->SetVirtualURL(url); 255 entry->SetVirtualURL(url);
256 entry->SetTimestamp(timestamp); 256 entry->SetTimestamp(timestamp);
257 blocked_navigations_.push_back(entry.release()); 257 blocked_navigations_.push_back(entry.release());
258 } 258 }
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_mode_interstitial.cc ('k') | chrome/browser/managed_mode/managed_user_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698