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

Side by Side Diff: chrome/test/chromedriver/session_commands.cc

Issue 101203012: [chromedriver] Add an error autoreporting feature that automatically raises errors from browser logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/test/chromedriver/session_commands.h" 5 #include "chrome/test/chromedriver/session_commands.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 600 }
601 std::string error_msg; 601 std::string error_msg;
602 base::FilePath upload; 602 base::FilePath upload;
603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); 603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload);
604 if (status.IsError()) 604 if (status.IsError())
605 return Status(kUnknownError, "unable to unzip 'file'", status); 605 return Status(kUnknownError, "unable to unzip 'file'", status);
606 606
607 value->reset(new base::StringValue(upload.value())); 607 value->reset(new base::StringValue(upload.value()));
608 return Status(kOk); 608 return Status(kOk);
609 } 609 }
610
611 Status ExecuteIsAutoReportingEnabled(
612 Session* session,
613 const base::DictionaryValue& params,
614 scoped_ptr<base::Value>* value) {
615 value->reset(new base::FundamentalValue(session->auto_reporting_enabled));
616 return Status(kOk);
617 }
618
619 Status ExecuteSetAutoReportingEnabled(
620 Session* session,
621 const base::DictionaryValue& params,
622 scoped_ptr<base::Value>* value) {
623 bool enable;
624 if (!params.GetBoolean("enable", &enable))
625 return Status(kUnknownError, "missing parameter 'enable'");
626 session->auto_reporting_enabled = enable;
627 return ExecuteIsAutoReportingEnabled(session, params, value);
chrisgao (Use stgao instead) 2014/01/09 22:11:55 Hmm, do we want to return the new value? It seems
samuong 2014/01/16 00:29:28 I thought it might be useful for clients but you'r
628 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698