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

Side by Side Diff: chrome/browser/browser_about_handler.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 | « base/sys_string_conversions.h ('k') | chrome/browser/browser_main.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/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 "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 l10n_util::GetString(IDS_ABOUT_PLUGINS_DESCRIPTION_LABEL)); 240 l10n_util::GetString(IDS_ABOUT_PLUGINS_DESCRIPTION_LABEL));
241 localized_strings.SetString(L"suffixes", 241 localized_strings.SetString(L"suffixes",
242 l10n_util::GetString(IDS_ABOUT_PLUGINS_SUFFIX_LABEL)); 242 l10n_util::GetString(IDS_ABOUT_PLUGINS_SUFFIX_LABEL));
243 localized_strings.SetString(L"enabled", 243 localized_strings.SetString(L"enabled",
244 l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_LABEL)); 244 l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_LABEL));
245 localized_strings.SetString(L"enabled_yes", 245 localized_strings.SetString(L"enabled_yes",
246 l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_YES)); 246 l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_YES));
247 localized_strings.SetString(L"enabled_no", 247 localized_strings.SetString(L"enabled_no",
248 l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_NO)); 248 l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_NO));
249 249
250 static const StringPiece plugins_html( 250 static const base::StringPiece plugins_html(
251 ResourceBundle::GetSharedInstance().GetRawDataResource( 251 ResourceBundle::GetSharedInstance().GetRawDataResource(
252 IDR_ABOUT_PLUGINS_HTML)); 252 IDR_ABOUT_PLUGINS_HTML));
253 253
254 return jstemplate_builder::GetTemplateHtml( 254 return jstemplate_builder::GetTemplateHtml(
255 plugins_html, &localized_strings, "t" /* template root node id */); 255 plugins_html, &localized_strings, "t" /* template root node id */);
256 } 256 }
257 257
258 std::string AboutStats() { 258 std::string AboutStats() {
259 // We keep the DictionaryValue tree live so that we can do delta 259 // We keep the DictionaryValue tree live so that we can do delta
260 // stats computations across runs. 260 // stats computations across runs.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // Store this on the timers list as well. 341 // Store this on the timers list as well.
342 timers->Append(counter); 342 timers->Append(counter);
343 } 343 }
344 break; 344 break;
345 default: 345 default:
346 NOTREACHED(); 346 NOTREACHED();
347 } 347 }
348 } 348 }
349 349
350 // Get about_stats.html 350 // Get about_stats.html
351 static const StringPiece stats_html( 351 static const base::StringPiece stats_html(
352 ResourceBundle::GetSharedInstance().GetRawDataResource( 352 ResourceBundle::GetSharedInstance().GetRawDataResource(
353 IDR_ABOUT_STATS_HTML)); 353 IDR_ABOUT_STATS_HTML));
354 354
355 // Create jstemplate and return. 355 // Create jstemplate and return.
356 std::string data = jstemplate_builder::GetTemplateHtml( 356 std::string data = jstemplate_builder::GetTemplateHtml(
357 stats_html, &root, "t" /* template root node id */); 357 stats_html, &root, "t" /* template root node id */);
358 358
359 // Clear the timer list since we stored the data in the timers list as well. 359 // Clear the timer list since we stored the data in the timers list as well.
360 for (int index = static_cast<int>(timers->GetSize())-1; index >= 0; 360 for (int index = static_cast<int>(timers->GetSize())-1; index >= 0;
361 index--) { 361 index--) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 AddIntSyncDetail(details, L"Updates Available", 507 AddIntSyncDetail(details, L"Updates Available",
508 full_status.updates_available); 508 full_status.updates_available);
509 AddIntSyncDetail(details, L"Updates Received", 509 AddIntSyncDetail(details, L"Updates Received",
510 full_status.updates_received); 510 full_status.updates_received);
511 AddBoolSyncDetail(details, L"Disk Full", full_status.disk_full); 511 AddBoolSyncDetail(details, L"Disk Full", full_status.disk_full);
512 AddBoolSyncDetail(details, L"Invalid Store", full_status.invalid_store); 512 AddBoolSyncDetail(details, L"Invalid Store", full_status.invalid_store);
513 AddIntSyncDetail(details, L"Max Consecutive Errors", 513 AddIntSyncDetail(details, L"Max Consecutive Errors",
514 full_status.max_consecutive_errors); 514 full_status.max_consecutive_errors);
515 } 515 }
516 516
517 static const StringPiece sync_html( 517 static const base::StringPiece sync_html(
518 ResourceBundle::GetSharedInstance().GetRawDataResource( 518 ResourceBundle::GetSharedInstance().GetRawDataResource(
519 IDR_ABOUT_SYNC_HTML)); 519 IDR_ABOUT_SYNC_HTML));
520 520
521 return jstemplate_builder::GetTemplateHtml( 521 return jstemplate_builder::GetTemplateHtml(
522 sync_html, &strings , "t" /* template root node id */); 522 sync_html, &strings , "t" /* template root node id */);
523 } 523 }
524 #endif 524 #endif
525 525
526 // AboutSource ----------------------------------------------------------------- 526 // AboutSource -----------------------------------------------------------------
527 527
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 713
714 ProcessData process = browser_processes[0]; // Chrome is the first browser. 714 ProcessData process = browser_processes[0]; // Chrome is the first browser.
715 for (size_t index = 0; index < process.processes.size(); index++) { 715 for (size_t index = 0; index < process.processes.size(); index++) {
716 if (process.processes[index].type == ChildProcessInfo::BROWSER_PROCESS) 716 if (process.processes[index].type == ChildProcessInfo::BROWSER_PROCESS)
717 BindProcessMetrics(browser_data, &process.processes[index]); 717 BindProcessMetrics(browser_data, &process.processes[index]);
718 else 718 else
719 AppendProcess(child_data, &process.processes[index]); 719 AppendProcess(child_data, &process.processes[index]);
720 } 720 }
721 721
722 // Get about_memory.html 722 // Get about_memory.html
723 static const StringPiece memory_html( 723 static const base::StringPiece memory_html(
724 ResourceBundle::GetSharedInstance().GetRawDataResource( 724 ResourceBundle::GetSharedInstance().GetRawDataResource(
725 IDR_ABOUT_MEMORY_HTML)); 725 IDR_ABOUT_MEMORY_HTML));
726 726
727 // Create jstemplate and return. 727 // Create jstemplate and return.
728 std::string template_html = jstemplate_builder::GetTemplateHtml( 728 std::string template_html = jstemplate_builder::GetTemplateHtml(
729 memory_html, &root, "t" /* template root node id */); 729 memory_html, &root, "t" /* template root node id */);
730 730
731 source_->FinishDataRequest(template_html, request_id_); 731 source_->FinishDataRequest(template_html, request_id_);
732 } 732 }
733 733
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 AboutIPCDialog::RunDialog(); 850 AboutIPCDialog::RunDialog();
851 return true; 851 return true;
852 } 852 }
853 #endif 853 #endif
854 854
855 #else 855 #else
856 // TODO(port) Implement this. 856 // TODO(port) Implement this.
857 #endif 857 #endif
858 return false; 858 return false;
859 } 859 }
OLDNEW
« no previous file with comments | « base/sys_string_conversions.h ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698