Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 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_BROWSER_ABOUT_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ | 6 #define CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 friend struct DefaultSingletonTraits<AboutTcmallocOutputs>; | 73 friend struct DefaultSingletonTraits<AboutTcmallocOutputs>; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(AboutTcmallocOutputs); | 75 DISALLOW_COPY_AND_ASSIGN(AboutTcmallocOutputs); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // Glue between the callback task and the method in the singleton. | 78 // Glue between the callback task and the method in the singleton. |
| 79 void AboutTcmallocRendererCallback(base::ProcessId pid, | 79 void AboutTcmallocRendererCallback(base::ProcessId pid, |
| 80 const std::string& output); | 80 const std::string& output); |
| 81 #endif // defined(USE_TCMALLOC) | 81 #endif // defined(USE_TCMALLOC) |
| 82 | 82 |
| 83 #if defined(OS_ANDROID) | |
| 84 class AboutAndroidApp { | |
|
Evan Stade
2012/08/03 17:58:01
why is this class in this file?
you need to docum
| |
| 85 public: | |
| 86 typedef std::string (*Callback)(); | |
| 87 | |
| 88 static std::string GetAppLabel() { | |
| 89 return label_getter_ != NULL ? label_getter_() : ""; | |
| 90 } | |
| 91 | |
| 92 static std::string GetAppVersionName() { | |
| 93 return version_name_getter_ != NULL ? version_name_getter_() : ""; | |
| 94 } | |
| 95 | |
| 96 static std::string GetAppVersionCode() { | |
| 97 return version_code_getter_ != NULL ? version_code_getter_() : ""; | |
| 98 } | |
| 99 | |
| 100 static void RegisterGetters(Callback label_getter, | |
| 101 Callback version_name_getter, Callback version_code_getter); | |
|
Evan Stade
2012/08/03 17:58:01
too much indent
| |
| 102 | |
| 103 private: | |
| 104 static Callback label_getter_; | |
| 105 static Callback version_name_getter_; | |
| 106 static Callback version_code_getter_; | |
| 107 | |
| 108 DISALLOW_IMPLICIT_CONSTRUCTORS(AboutAndroidApp); | |
| 109 }; | |
| 110 #endif | |
| 111 | |
| 83 #endif // CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ | 112 #endif // CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ |
| OLD | NEW |