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

Side by Side Diff: chrome/browser/extensions/extension_processes_api.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extension_processes_api.h" 5 #include "chrome/browser/extensions/extension_processes_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 17 matching lines...) Expand all
28 28
29 DictionaryValue* CreateProcessValue(int process_id, 29 DictionaryValue* CreateProcessValue(int process_id,
30 std::string type, 30 std::string type,
31 double cpu, 31 double cpu,
32 int64 net, 32 int64 net,
33 int64 pr_mem, 33 int64 pr_mem,
34 int64 sh_mem) { 34 int64 sh_mem) {
35 DictionaryValue* result = new DictionaryValue(); 35 DictionaryValue* result = new DictionaryValue();
36 result->SetInteger(keys::kIdKey, process_id); 36 result->SetInteger(keys::kIdKey, process_id);
37 result->SetString(keys::kTypeKey, type); 37 result->SetString(keys::kTypeKey, type);
38 result->SetReal(keys::kCpuKey, cpu); 38 result->SetDouble(keys::kCpuKey, cpu);
39 result->SetReal(keys::kNetworkKey, static_cast<double>(net)); 39 result->SetDouble(keys::kNetworkKey, static_cast<double>(net));
40 result->SetReal(keys::kPrivateMemoryKey, static_cast<double>(pr_mem)); 40 result->SetDouble(keys::kPrivateMemoryKey, static_cast<double>(pr_mem));
41 result->SetReal(keys::kSharedMemoryKey, static_cast<double>(sh_mem)); 41 result->SetDouble(keys::kSharedMemoryKey, static_cast<double>(sh_mem));
42 return result; 42 return result;
43 } 43 }
44 44
45 ExtensionProcessesEventRouter* ExtensionProcessesEventRouter::GetInstance() { 45 ExtensionProcessesEventRouter* ExtensionProcessesEventRouter::GetInstance() {
46 return Singleton<ExtensionProcessesEventRouter>::get(); 46 return Singleton<ExtensionProcessesEventRouter>::get();
47 } 47 }
48 48
49 ExtensionProcessesEventRouter::ExtensionProcessesEventRouter() { 49 ExtensionProcessesEventRouter::ExtensionProcessesEventRouter() {
50 model_ = TaskManager::GetInstance()->model(); 50 model_ = TaskManager::GetInstance()->model();
51 model_->AddObserver(this); 51 model_->AddObserver(this);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 base::IntToString(tab_id)); 169 base::IntToString(tab_id));
170 return false; 170 return false;
171 } 171 }
172 172
173 // Return the process ID of the tab as an integer. 173 // Return the process ID of the tab as an integer.
174 int id = base::GetProcId(contents->tab_contents()-> 174 int id = base::GetProcId(contents->tab_contents()->
175 GetRenderProcessHost()->GetHandle()); 175 GetRenderProcessHost()->GetHandle());
176 result_.reset(Value::CreateIntegerValue(id)); 176 result_.reset(Value::CreateIntegerValue(id));
177 return true; 177 return true;
178 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698