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

Side by Side Diff: chrome/test/webdriver/webdriver_session.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more, Windows-only Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webdriver/webdriver_session.h" 5 #include "chrome/test/webdriver/webdriver_session.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return error; 576 return error;
577 } 577 }
578 578
579 Error* Session::SetCookie(const std::string& url, 579 Error* Session::SetCookie(const std::string& url,
580 DictionaryValue* cookie_dict) { 580 DictionaryValue* cookie_dict) {
581 Error* error = NULL; 581 Error* error = NULL;
582 RunSessionTask(base::Bind( 582 RunSessionTask(base::Bind(
583 &Automation::SetCookie, 583 &Automation::SetCookie,
584 base::Unretained(automation_.get()), 584 base::Unretained(automation_.get()),
585 url, 585 url,
586 cookie_dict, 586 cookie_dict,
vabr (Chromium) 2012/07/26 20:48:03 Does this deep-copy cookie_dict, or does it rather
587 &error)); 587 &error));
588 return error; 588 return error;
589 } 589 }
590 590
591 Error* Session::GetViews(std::vector<WebViewInfo>* views) { 591 Error* Session::GetViews(std::vector<WebViewInfo>* views) {
592 Error* error = NULL; 592 Error* error = NULL;
593 RunSessionTask(base::Bind( 593 RunSessionTask(base::Bind(
594 &Automation::GetViews, 594 &Automation::GetViews,
595 base::Unretained(automation_.get()), 595 base::Unretained(automation_.get()),
596 views, 596 views,
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 Error* Session::GetGeolocation(scoped_ptr<base::DictionaryValue>* geolocation) { 1367 Error* Session::GetGeolocation(scoped_ptr<base::DictionaryValue>* geolocation) {
1368 Error* error = NULL; 1368 Error* error = NULL;
1369 RunSessionTask(base::Bind( 1369 RunSessionTask(base::Bind(
1370 &Automation::GetGeolocation, 1370 &Automation::GetGeolocation,
1371 base::Unretained(automation_.get()), 1371 base::Unretained(automation_.get()),
1372 geolocation, 1372 geolocation,
1373 &error)); 1373 &error));
1374 return error; 1374 return error;
1375 } 1375 }
1376 1376
1377 Error* Session::OverrideGeolocation(base::DictionaryValue* geolocation) { 1377 Error* Session::OverrideGeolocation(const base::DictionaryValue* geolocation) {
1378 Error* error = NULL; 1378 Error* error = NULL;
1379 RunSessionTask(base::Bind( 1379 RunSessionTask(base::Bind(
1380 &Automation::OverrideGeolocation, 1380 &Automation::OverrideGeolocation,
1381 base::Unretained(automation_.get()), 1381 base::Unretained(automation_.get()),
1382 geolocation, 1382 geolocation,
1383 &error)); 1383 &error));
1384 return error; 1384 return error;
1385 } 1385 }
1386 1386
1387 const std::string& Session::id() const { 1387 const std::string& Session::id() const {
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 capabilities_.local_state->GetWithoutPathExpansion(*iter, &value); 1922 capabilities_.local_state->GetWithoutPathExpansion(*iter, &value);
1923 Error* error = SetPreference(*iter, false /* is_user_pref */, 1923 Error* error = SetPreference(*iter, false /* is_user_pref */,
1924 value->DeepCopy()); 1924 value->DeepCopy());
1925 if (error) 1925 if (error)
1926 return error; 1926 return error;
1927 } 1927 }
1928 return NULL; 1928 return NULL;
1929 } 1929 }
1930 1930
1931 } // namespace webdriver 1931 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698