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

Side by Side Diff: chrome/browser/ssl/ssl_policy.cc

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 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
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/views/sync/sync_setup_wizard.cc » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/ssl/ssl_policy.h" 5 #include "chrome/browser/ssl/ssl_policy.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 strings.SetString(L"moreInfoTitle", 279 strings.SetString(L"moreInfoTitle",
280 l10n_util::GetString(IDS_CERT_ERROR_EXTRA_INFO_TITLE)); 280 l10n_util::GetString(IDS_CERT_ERROR_EXTRA_INFO_TITLE));
281 SSLBlockingPage::SetExtraInfo(&strings, error_info.extra_information()); 281 SSLBlockingPage::SetExtraInfo(&strings, error_info.extra_information());
282 282
283 strings.SetString(L"back", l10n_util::GetString(IDS_SSL_ERROR_PAGE_BACK)); 283 strings.SetString(L"back", l10n_util::GetString(IDS_SSL_ERROR_PAGE_BACK));
284 284
285 strings.SetString(L"textdirection", 285 strings.SetString(L"textdirection",
286 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ? 286 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
287 L"rtl" : L"ltr"); 287 L"rtl" : L"ltr");
288 288
289 static const StringPiece html( 289 static const base::StringPiece html(
290 ResourceBundle::GetSharedInstance().GetRawDataResource( 290 ResourceBundle::GetSharedInstance().GetRawDataResource(
291 IDR_SSL_ERROR_HTML)); 291 IDR_SSL_ERROR_HTML));
292 292
293 std::string html_text(jstemplate_builder::GetI18nTemplateHtml(html, 293 std::string html_text(jstemplate_builder::GetI18nTemplateHtml(html,
294 &strings)); 294 &strings));
295 295
296 TabContents* tab = handler->GetTabContents(); 296 TabContents* tab = handler->GetTabContents();
297 int cert_id = CertStore::GetSharedInstance()->StoreCert( 297 int cert_id = CertStore::GetSharedInstance()->StoreCert(
298 handler->ssl_info().cert, 298 handler->ssl_info().cert,
299 tab->render_view_host()->process()->id()); 299 tab->render_view_host()->process()->id());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // mark the main frame's origin as broken too. 355 // mark the main frame's origin as broken too.
356 MarkOriginAsBroken(info->main_frame_origin(), info->child_id()); 356 MarkOriginAsBroken(info->main_frame_origin(), info->child_id());
357 } 357 }
358 } 358 }
359 359
360 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) { 360 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) {
361 // This request as a broken cert, which means its host is broken. 361 // This request as a broken cert, which means its host is broken.
362 backend_->MarkHostAsBroken(info->url().host(), info->child_id()); 362 backend_->MarkHostAsBroken(info->url().host(), info->child_id());
363 UpdateStateForMixedContent(info); 363 UpdateStateForMixedContent(info);
364 } 364 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/views/sync/sync_setup_wizard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698