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

Side by Side Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 634583003: Simplify VersionInfo code, avoid hitting sandbox IPC constantly on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linux include Created 6 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
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/ui/webui/help/help_handler.h" 5 #include "chrome/browser/ui/webui/help/help_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 break; 305 break;
306 } 306 }
307 default: 307 default:
308 NOTREACHED(); 308 NOTREACHED();
309 } 309 }
310 } 310 }
311 311
312 // static 312 // static
313 base::string16 HelpHandler::BuildBrowserVersionString() { 313 base::string16 HelpHandler::BuildBrowserVersionString() {
314 chrome::VersionInfo version_info; 314 chrome::VersionInfo version_info;
315 DCHECK(version_info.is_valid());
316 315
317 std::string version = version_info.Version(); 316 std::string version = version_info.Version();
318 317
319 std::string modifier = chrome::VersionInfo::GetVersionStringModifier(); 318 std::string modifier = chrome::VersionInfo::GetVersionStringModifier();
320 if (!modifier.empty()) 319 if (!modifier.empty())
321 version += " " + modifier; 320 version += " " + modifier;
322 321
323 #if defined(ARCH_CPU_64_BITS) 322 #if defined(ARCH_CPU_64_BITS)
324 version += " (64-bit)"; 323 version += " (64-bit)";
325 #endif 324 #endif
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 web_ui()->CallJavascriptFunction( 552 web_ui()->CallJavascriptFunction(
554 "help.HelpPage.updateCurrentChannel", base::StringValue(channel)); 553 "help.HelpPage.updateCurrentChannel", base::StringValue(channel));
555 } 554 }
556 555
557 void HelpHandler::OnTargetChannel(const std::string& channel) { 556 void HelpHandler::OnTargetChannel(const std::string& channel) {
558 web_ui()->CallJavascriptFunction( 557 web_ui()->CallJavascriptFunction(
559 "help.HelpPage.updateTargetChannel", base::StringValue(channel)); 558 "help.HelpPage.updateTargetChannel", base::StringValue(channel));
560 } 559 }
561 560
562 #endif // defined(OS_CHROMEOS) 561 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698