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

Side by Side Diff: chrome/browser/ui/webui/quota_internals_handler.cc

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix memory leaks in tests Created 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/quota_internals_handler.h" 5 #include "chrome/browser/ui/webui/quota_internals_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/webui/quota_internals_proxy.h" 13 #include "chrome/browser/ui/webui/quota_internals_proxy.h"
14 #include "chrome/browser/ui/webui/quota_internals_types.h" 14 #include "chrome/browser/ui/webui/quota_internals_types.h"
15 #include "content/public/browser/web_ui.h" 15 #include "content/public/browser/web_ui.h"
16 #include "net/base/net_util.h" 16 #include "net/base/net_util.h"
17 17
18 using content::BrowserContext;
19
18 namespace quota_internals { 20 namespace quota_internals {
19 21
20 QuotaInternalsHandler::QuotaInternalsHandler() {} 22 QuotaInternalsHandler::QuotaInternalsHandler() {}
21 23
22 QuotaInternalsHandler::~QuotaInternalsHandler() { 24 QuotaInternalsHandler::~QuotaInternalsHandler() {
23 if (proxy_) 25 if (proxy_)
24 proxy_->handler_ = NULL; 26 proxy_->handler_ = NULL;
25 } 27 }
26 28
27 void QuotaInternalsHandler::RegisterMessages() { 29 void QuotaInternalsHandler::RegisterMessages() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const base::Value& value) { 79 const base::Value& value) {
78 scoped_ptr<base::Value> message_data(base::Value::CreateStringValue(message)); 80 scoped_ptr<base::Value> message_data(base::Value::CreateStringValue(message));
79 web_ui()->CallJavascriptFunction("cr.quota.messageHandler", 81 web_ui()->CallJavascriptFunction("cr.quota.messageHandler",
80 *message_data, 82 *message_data,
81 value); 83 value);
82 } 84 }
83 85
84 void QuotaInternalsHandler::OnRequestInfo(const base::ListValue*) { 86 void QuotaInternalsHandler::OnRequestInfo(const base::ListValue*) {
85 if (!proxy_) 87 if (!proxy_)
86 proxy_ = new QuotaInternalsProxy(this); 88 proxy_ = new QuotaInternalsProxy(this);
87 proxy_->RequestInfo(Profile::FromWebUI(web_ui())->GetQuotaManager()); 89 proxy_->RequestInfo(
90 content::BrowserContext::GetQuotaManager(Profile::FromWebUI(web_ui())));
88 } 91 }
89 92
90 } // namespace quota_internals 93 } // namespace quota_internals
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698