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

Side by Side Diff: chrome/browser/extensions/api/processes/processes_api.cc

Issue 2435603002: [WeakMemoryCache] Remove dead/live distinction of Resource outside core/fetch (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/processes/processes_api.h" 5 #include "chrome/browser/extensions/api/processes/processes_api.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 task_manager::REFRESH_TYPE_NETWORK_USAGE | 53 task_manager::REFRESH_TYPE_NETWORK_USAGE |
54 task_manager::REFRESH_TYPE_SQLITE_MEMORY | 54 task_manager::REFRESH_TYPE_SQLITE_MEMORY |
55 task_manager::REFRESH_TYPE_V8_MEMORY | 55 task_manager::REFRESH_TYPE_V8_MEMORY |
56 task_manager::REFRESH_TYPE_WEBCACHE_STATS; 56 task_manager::REFRESH_TYPE_WEBCACHE_STATS;
57 } 57 }
58 58
59 std::unique_ptr<api::processes::Cache> CreateCacheData( 59 std::unique_ptr<api::processes::Cache> CreateCacheData(
60 const blink::WebCache::ResourceTypeStat& stat) { 60 const blink::WebCache::ResourceTypeStat& stat) {
61 std::unique_ptr<api::processes::Cache> cache(new api::processes::Cache()); 61 std::unique_ptr<api::processes::Cache> cache(new api::processes::Cache());
62 cache->size = static_cast<double>(stat.size); 62 cache->size = static_cast<double>(stat.size);
63 cache->live_size = static_cast<double>(stat.liveSize); 63 cache->live_size = static_cast<double>(stat.size);
64 return cache; 64 return cache;
65 } 65 }
66 66
67 api::processes::ProcessType GetProcessType( 67 api::processes::ProcessType GetProcessType(
68 task_manager::Task::Type task_type) { 68 task_manager::Task::Type task_type) {
69 switch (task_type) { 69 switch (task_type) {
70 case task_manager::Task::BROWSER: 70 case task_manager::Task::BROWSER:
71 return api::processes::PROCESS_TYPE_BROWSER; 71 return api::processes::PROCESS_TYPE_BROWSER;
72 72
73 case task_manager::Task::RENDERER: 73 case task_manager::Task::RENDERER:
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // Send the response. 680 // Send the response.
681 Respond(ArgumentList( 681 Respond(ArgumentList(
682 api::processes::GetProcessInfo::Results::Create(processes))); 682 api::processes::GetProcessInfo::Results::Create(processes)));
683 683
684 // Stop observing the task manager, and balance the AddRef() in Run(). 684 // Stop observing the task manager, and balance the AddRef() in Run().
685 task_manager::TaskManagerInterface::GetTaskManager()->RemoveObserver(this); 685 task_manager::TaskManagerInterface::GetTaskManager()->RemoveObserver(this);
686 Release(); 686 Release();
687 } 687 }
688 688
689 } // namespace extensions 689 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698