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

Side by Side Diff: chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc

Issue 1181213002: Slow Reports - Embed Metadata in Traces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed. Created 5 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/prefs/pref_service.h" 6 #include "base/prefs/pref_service.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int get_receive_count() const { return receive_count_; } 66 int get_receive_count() const { return receive_count_; }
67 bool get_started_finalizations() const { 67 bool get_started_finalizations() const {
68 return started_finalizations_count_; 68 return started_finalizations_count_;
69 } 69 }
70 bool get_last_started_finalization_success() const { 70 bool get_last_started_finalization_success() const {
71 return last_on_started_finalizing_success_; 71 return last_on_started_finalizing_success_;
72 } 72 }
73 73
74 private: 74 private:
75 void OnUpload(const scoped_refptr<base::RefCountedString>& file_contents, 75 void OnUpload(const scoped_refptr<base::RefCountedString>& file_contents,
76 scoped_ptr<base::DictionaryValue> metadata,
76 base::Callback<void()> done_callback) { 77 base::Callback<void()> done_callback) {
77 receive_count_ += 1; 78 receive_count_ += 1;
78 79
79 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 80 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
80 base::Bind(done_callback)); 81 base::Bind(done_callback));
81 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 82 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
82 base::Bind(on_upload_callback_)); 83 base::Bind(on_upload_callback_));
83 } 84 }
84 85
85 void OnStartedFinalizing(bool success) { 86 void OnStartedFinalizing(bool success) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 179
179 base::RunLoop wait_for_finalization_start; 180 base::RunLoop wait_for_finalization_start;
180 TriggerReactiveScenario(wait_for_finalization_start.QuitClosure()); 181 TriggerReactiveScenario(wait_for_finalization_start.QuitClosure());
181 wait_for_finalization_start.Run(); 182 wait_for_finalization_start.Run();
182 183
183 EXPECT_TRUE(get_started_finalizations() == 1); 184 EXPECT_TRUE(get_started_finalizations() == 1);
184 EXPECT_FALSE(get_last_started_finalization_success()); 185 EXPECT_FALSE(get_last_started_finalization_success());
185 } 186 }
186 187
187 } // namespace 188 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/tracing/background_tracing_field_trial.cc ('k') | chrome/browser/tracing/crash_service_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698