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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 19025: Add support for UA spoofing, and spoof Safari's UA string when loading URLs... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 11 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) 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/browser_about_handler.h" 5 #include "chrome/browser/browser_about_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 l10n_util::GetString(IDS_ABOUT_VERSION_COPYRIGHT)); 267 l10n_util::GetString(IDS_ABOUT_VERSION_COPYRIGHT));
268 localized_strings.SetString(L"cl", version_info->last_change()); 268 localized_strings.SetString(L"cl", version_info->last_change());
269 if (version_info->is_official_build()) { 269 if (version_info->is_official_build()) {
270 localized_strings.SetString(L"official", 270 localized_strings.SetString(L"official",
271 l10n_util::GetString(IDS_ABOUT_VERSION_OFFICIAL)); 271 l10n_util::GetString(IDS_ABOUT_VERSION_OFFICIAL));
272 } else { 272 } else {
273 localized_strings.SetString(L"official", 273 localized_strings.SetString(L"official",
274 l10n_util::GetString(IDS_ABOUT_VERSION_UNOFFICIAL)); 274 l10n_util::GetString(IDS_ABOUT_VERSION_UNOFFICIAL));
275 } 275 }
276 localized_strings.SetString(L"useragent", 276 localized_strings.SetString(L"useragent",
277 UTF8ToWide(webkit_glue::GetUserAgent())); 277 UTF8ToWide(webkit_glue::GetUserAgent(GURL())));
278 278
279 static const StringPiece version_html( 279 static const StringPiece version_html(
280 ResourceBundle::GetSharedInstance().GetRawDataResource( 280 ResourceBundle::GetSharedInstance().GetRawDataResource(
281 IDR_ABOUT_VERSION_HTML)); 281 IDR_ABOUT_VERSION_HTML));
282 282
283 return jstemplate_builder::GetTemplateHtml( 283 return jstemplate_builder::GetTemplateHtml(
284 version_html, &localized_strings, "t" /* template root node id */); 284 version_html, &localized_strings, "t" /* template root node id */);
285 } 285 }
286 286
287 // static 287 // static
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 AboutSource* about_source = static_cast<AboutSource*>(source_); 659 AboutSource* about_source = static_cast<AboutSource*>(source_);
660 about_source->FinishDataRequest(template_html, request_id_); 660 about_source->FinishDataRequest(template_html, request_id_);
661 } 661 }
662 662
663 // static 663 // static
664 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) { 664 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) {
665 // The AboutMemoryHandler cleans itself up. 665 // The AboutMemoryHandler cleans itself up.
666 new AboutMemoryHandler(source, request_id); 666 new AboutMemoryHandler(source, request_id);
667 } 667 }
668 668
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.h » ('j') | net/url_request/url_request_context.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698