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

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

Issue 10038034: Implemented a "Last Updated" field for the about page of Chrome OS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved file operations to file thread, cached result, fixed style issues Created 8 years, 8 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 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/platform_file.h"
11 #include "chrome/browser/ui/webui/help/version_updater.h" 12 #include "chrome/browser/ui/webui/help/version_updater.h"
12 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
14 #include "content/public/browser/web_ui_message_handler.h" 15 #include "content/public/browser/web_ui_message_handler.h"
15 16
16 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
17 #include "chrome/browser/chromeos/version_loader.h" 18 #include "chrome/browser/chromeos/version_loader.h"
18 #endif // defined(OS_CHROMEOS) 19 #endif // defined(OS_CHROMEOS)
19 20
20 // WebUI message handler for the help page. 21 // WebUI message handler for the help page.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Callback method which forwards promotion state to the page. 66 // Callback method which forwards promotion state to the page.
66 void SetPromotionState(VersionUpdater::PromotionState state); 67 void SetPromotionState(VersionUpdater::PromotionState state);
67 #endif 68 #endif
68 69
69 #if defined(OS_CHROMEOS) 70 #if defined(OS_CHROMEOS)
70 // Callbacks from VersionLoader. 71 // Callbacks from VersionLoader.
71 void OnOSVersion(chromeos::VersionLoader::Handle handle, std::string version); 72 void OnOSVersion(chromeos::VersionLoader::Handle handle, std::string version);
72 void OnOSFirmware(chromeos::VersionLoader::Handle handle, 73 void OnOSFirmware(chromeos::VersionLoader::Handle handle,
73 std::string firmware); 74 std::string firmware);
74 void OnReleaseChannel(const std::string& channel); 75 void OnReleaseChannel(const std::string& channel);
76
77 void ProcessLsbFileInfo(
78 base::PlatformFileError rv, const base::PlatformFileInfo& file_info);
75 #endif 79 #endif
76 80
77 // Specialized instance of the VersionUpdater used to update the browser. 81 // Specialized instance of the VersionUpdater used to update the browser.
78 scoped_ptr<VersionUpdater> version_updater_; 82 scoped_ptr<VersionUpdater> version_updater_;
79 83
84 // Used for callbacks.
85 base::WeakPtrFactory<HelpHandler> weak_factory_;
86
80 // Used to observe notifications. 87 // Used to observe notifications.
81 content::NotificationRegistrar registrar_; 88 content::NotificationRegistrar registrar_;
82 89
83 #if defined(OS_CHROMEOS) 90 #if defined(OS_CHROMEOS)
84 // Handles asynchronously loading the CrOS version info. 91 // Handles asynchronously loading the CrOS version info.
85 chromeos::VersionLoader loader_; 92 chromeos::VersionLoader loader_;
86 93
87 // Used to request the version. 94 // Used to request the version.
88 CancelableRequestConsumer consumer_; 95 CancelableRequestConsumer consumer_;
89 #endif // defined(OS_CHROMEOS) 96 #endif // defined(OS_CHROMEOS)
90 97
91 DISALLOW_COPY_AND_ASSIGN(HelpHandler); 98 DISALLOW_COPY_AND_ASSIGN(HelpHandler);
92 }; 99 };
93 100
94 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ 101 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698