OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/task_manager/extension_process_resource_provider.h" | 5 #include "chrome/browser/task_manager/extension_process_resource_provider.h" |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 base::string16 extension_name = base::UTF8ToUTF16(GetExtension()->name()); | 91 base::string16 extension_name = base::UTF8ToUTF16(GetExtension()->name()); |
92 DCHECK(!extension_name.empty()); | 92 DCHECK(!extension_name.empty()); |
93 | 93 |
94 Profile* profile = Profile::FromBrowserContext( | 94 Profile* profile = Profile::FromBrowserContext( |
95 render_view_host->GetProcess()->GetBrowserContext()); | 95 render_view_host->GetProcess()->GetBrowserContext()); |
96 int message_id = util::GetMessagePrefixID( | 96 int message_id = util::GetMessagePrefixID( |
97 GetExtension()->is_app(), | 97 GetExtension()->is_app(), |
98 true, // is_extension | 98 true, // is_extension |
99 profile->IsOffTheRecord(), | 99 profile->IsOffTheRecord(), |
100 false, // is_prerender | 100 false, // is_prerender |
101 false, // is_instant_overlay | |
102 IsBackground()); | 101 IsBackground()); |
103 title_ = l10n_util::GetStringFUTF16(message_id, extension_name); | 102 title_ = l10n_util::GetStringFUTF16(message_id, extension_name); |
104 } | 103 } |
105 | 104 |
106 ExtensionProcessResource::~ExtensionProcessResource() { | 105 ExtensionProcessResource::~ExtensionProcessResource() { |
107 } | 106 } |
108 | 107 |
109 base::string16 ExtensionProcessResource::GetTitle() const { | 108 base::string16 ExtensionProcessResource::GetTitle() const { |
110 return title_; | 109 return title_; |
111 } | 110 } |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 task_manager_->RemoveResource(resource); | 339 task_manager_->RemoveResource(resource); |
341 | 340 |
342 // Remove it from the provider. | 341 // Remove it from the provider. |
343 resources_.erase(iter); | 342 resources_.erase(iter); |
344 | 343 |
345 // Finally, delete the resource. | 344 // Finally, delete the resource. |
346 delete resource; | 345 delete resource; |
347 } | 346 } |
348 | 347 |
349 } // namespace task_manager | 348 } // namespace task_manager |
OLD | NEW |