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

Side by Side Diff: chrome/browser/ui/webui/options/about_page_handler.cc

Issue 7249003: Move GetVersionStringModifier() and GetChannel() from platform_util_* to chrome_version_info_* (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Move GetVersionStringModifier() and GetChannel() from platform_util_* to chrome_version_info.cc Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/about_page_handler.h" 5 #include "chrome/browser/ui/webui/options/about_page_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/i18n/time_formatting.h" 12 #include "base/i18n/time_formatting.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/google/google_util.h" 18 #include "chrome/browser/google/google_util.h"
19 #include "chrome/browser/platform_util.h"
20 #include "chrome/common/chrome_version_info.h" 19 #include "chrome/common/chrome_version_info.h"
21 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
22 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
23 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
24 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
25 #include "grit/locale_settings.h" 24 #include "grit/locale_settings.h"
26 #include "grit/theme_resources.h" 25 #include "grit/theme_resources.h"
27 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
29 #include "webkit/glue/webkit_glue.h" 28 #include "webkit/glue/webkit_glue.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 134
136 RegisterStrings(localized_strings, resources, arraysize(resources)); 135 RegisterStrings(localized_strings, resources, arraysize(resources));
137 RegisterTitle(localized_strings, "aboutPage", IDS_ABOUT_TAB_TITLE); 136 RegisterTitle(localized_strings, "aboutPage", IDS_ABOUT_TAB_TITLE);
138 137
139 // browser version 138 // browser version
140 139
141 chrome::VersionInfo version_info; 140 chrome::VersionInfo version_info;
142 DCHECK(version_info.is_valid()); 141 DCHECK(version_info.is_valid());
143 142
144 std::string browser_version = version_info.Version(); 143 std::string browser_version = version_info.Version();
145 std::string version_modifier = platform_util::GetVersionStringModifier(); 144 std::string version_modifier =
145 chrome::VersionInfo::GetVersionStringModifier();
146 if (!version_modifier.empty()) 146 if (!version_modifier.empty())
147 browser_version += " " + version_modifier; 147 browser_version += " " + version_modifier;
148 148
149 #if !defined(GOOGLE_CHROME_BUILD) 149 #if !defined(GOOGLE_CHROME_BUILD)
150 browser_version += " ("; 150 browser_version += " (";
151 browser_version += version_info.LastChange(); 151 browser_version += version_info.LastChange();
152 browser_version += ")"; 152 browser_version += ")";
153 #endif 153 #endif
154 154
155 localized_strings->SetString("browser_version", browser_version); 155 localized_strings->SetString("browser_version", browser_version);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 if (chromeos::CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { 442 if (chromeos::CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) {
443 // If UpdateLibrary still has the observer, then the page handler is valid. 443 // If UpdateLibrary still has the observer, then the page handler is valid.
444 AboutPageHandler* handler = observer->page_handler(); 444 AboutPageHandler* handler = observer->page_handler();
445 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); 445 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel));
446 handler->web_ui_->CallJavascriptFunction( 446 handler->web_ui_->CallJavascriptFunction(
447 "AboutPage.updateSelectedOptionCallback", *channel_string); 447 "AboutPage.updateSelectedOptionCallback", *channel_string);
448 } 448 }
449 } 449 }
450 450
451 #endif // defined(OS_CHROMEOS) 451 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698