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

Side by Side Diff: chrome/browser/extensions/api/system_private/system_private_api.cc

Issue 24649002: Clean up a few more unused globals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thestig comment Created 7 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 | Annotate | Revision Log
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/extensions/api/system_private/system_private_api.h" 5 #include "chrome/browser/extensions/api/system_private/system_private_api.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/event_router_forwarder.h" 10 #include "chrome/browser/extensions/event_router_forwarder.h"
(...skipping 21 matching lines...) Expand all
32 // Property keys. 32 // Property keys.
33 const char kBrightnessKey[] = "brightness"; 33 const char kBrightnessKey[] = "brightness";
34 const char kDownloadProgressKey[] = "downloadProgress"; 34 const char kDownloadProgressKey[] = "downloadProgress";
35 const char kIsVolumeMutedKey[] = "isVolumeMuted"; 35 const char kIsVolumeMutedKey[] = "isVolumeMuted";
36 const char kStateKey[] = "state"; 36 const char kStateKey[] = "state";
37 const char kUserInitiatedKey[] = "userInitiated"; 37 const char kUserInitiatedKey[] = "userInitiated";
38 const char kVolumeKey[] = "volume"; 38 const char kVolumeKey[] = "volume";
39 39
40 // System update states. 40 // System update states.
41 const char kNotAvailableState[] = "NotAvailable"; 41 const char kNotAvailableState[] = "NotAvailable";
42 const char kNeedRestartState[] = "NeedRestart";
43
44 #if defined(OS_CHROMEOS)
42 const char kUpdatingState[] = "Updating"; 45 const char kUpdatingState[] = "Updating";
43 const char kNeedRestartState[] = "NeedRestart"; 46 #endif // defined(OS_CHROMEOS)
44 47
45 // Dispatches an extension event with |argument| 48 // Dispatches an extension event with |argument|
46 void DispatchEvent(const std::string& event_name, base::Value* argument) { 49 void DispatchEvent(const std::string& event_name, base::Value* argument) {
47 scoped_ptr<base::ListValue> list_args(new base::ListValue()); 50 scoped_ptr<base::ListValue> list_args(new base::ListValue());
48 if (argument) { 51 if (argument) {
49 list_args->Append(argument); 52 list_args->Append(argument);
50 } 53 }
51 g_browser_process->extension_event_router_forwarder()-> 54 g_browser_process->extension_event_router_forwarder()->
52 BroadcastEventToRenderers(event_name, list_args.Pass(), GURL()); 55 BroadcastEventToRenderers(event_name, list_args.Pass(), GURL());
53 } 56 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 148
146 void DispatchScreenUnlockedEvent() { 149 void DispatchScreenUnlockedEvent() {
147 DispatchEvent(system_private::OnScreenUnlocked::kEventName, NULL); 150 DispatchEvent(system_private::OnScreenUnlocked::kEventName, NULL);
148 } 151 }
149 152
150 void DispatchWokeUpEvent() { 153 void DispatchWokeUpEvent() {
151 DispatchEvent(system_private::OnWokeUp::kEventName, NULL); 154 DispatchEvent(system_private::OnWokeUp::kEventName, NULL);
152 } 155 }
153 156
154 } // namespace extensions 157 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698