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

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

Issue 8832001: Add an OWNERS file for the about:profiler javascript code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/profiler/profiler.js ('k') | no next file » | 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) 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/profiler_ui.h" 5 #include "chrome/browser/ui/webui/profiler_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 // When testing the javacript code, it is cumbersome to have to keep 9 // When testing the javacript code, it is cumbersome to have to keep
10 // re-building the resouces package and reloading the browser. To solve 10 // re-building the resouces package and reloading the browser. To solve
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 virtual void StartDataRequest(const std::string& path, 55 virtual void StartDataRequest(const std::string& path,
56 bool is_incognito, 56 bool is_incognito,
57 int request_id) OVERRIDE { 57 int request_id) OVERRIDE {
58 FilePath base_path; 58 FilePath base_path;
59 PathService::Get(base::DIR_SOURCE_ROOT, &base_path); 59 PathService::Get(base::DIR_SOURCE_ROOT, &base_path);
60 base_path = base_path.AppendASCII("chrome"); 60 base_path = base_path.AppendASCII("chrome");
61 base_path = base_path.AppendASCII("browser"); 61 base_path = base_path.AppendASCII("browser");
62 base_path = base_path.AppendASCII("resources"); 62 base_path = base_path.AppendASCII("resources");
63 base_path = base_path.AppendASCII("profiler");
63 64
64 // If no resource was specified, default to profiler.html. 65 // If no resource was specified, default to profiler.html.
65 std::string filename = path.empty() ? "profiler.html" : path; 66 std::string filename = path.empty() ? "profiler.html" : path;
66 67
67 FilePath file_path; 68 FilePath file_path;
68 file_path = base_path.AppendASCII(filename); 69 file_path = base_path.AppendASCII(filename);
69 70
70 // Read the file synchronously and send it as the response. 71 // Read the file synchronously and send it as the response.
71 base::ThreadRestrictions::ScopedAllowIO allow; 72 base::ThreadRestrictions::ScopedAllowIO allow;
72 std::string file_contents; 73 std::string file_contents;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void ProfilerUI::GetData() { 164 void ProfilerUI::GetData() {
164 TrackingSynchronizer::FetchProfilerDataAsynchronously(ui_weak_ptr_); 165 TrackingSynchronizer::FetchProfilerDataAsynchronously(ui_weak_ptr_);
165 } 166 }
166 167
167 void ProfilerUI::ReceivedData(base::Value* value) { 168 void ProfilerUI::ReceivedData(base::Value* value) {
168 // Send the data to the renderer. 169 // Send the data to the renderer.
169 scoped_ptr<Value> data_values(value); 170 scoped_ptr<Value> data_values(value);
170 CallJavascriptFunction("g_browserBridge.receivedData", *data_values.get()); 171 CallJavascriptFunction("g_browserBridge.receivedData", *data_values.get());
171 } 172 }
172 173
OLDNEW
« no previous file with comments | « chrome/browser/resources/profiler/profiler.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698