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

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

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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) 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 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 1837
1838 base::FilePath path = screenshots_dir.path().AppendASCII("screen"); 1838 base::FilePath path = screenshots_dir.path().AppendASCII("screen");
1839 RunSessionTask(base::Bind( 1839 RunSessionTask(base::Bind(
1840 &Automation::CaptureEntirePageAsPNG, 1840 &Automation::CaptureEntirePageAsPNG,
1841 base::Unretained(automation_.get()), 1841 base::Unretained(automation_.get()),
1842 current_target_.view_id, 1842 current_target_.view_id,
1843 path, 1843 path,
1844 &error)); 1844 &error));
1845 if (error) 1845 if (error)
1846 return error; 1846 return error;
1847 if (!file_util::ReadFileToString(path, png)) 1847 if (!base::ReadFileToString(path, png))
1848 return new Error(kUnknownError, "Could not read screenshot file"); 1848 return new Error(kUnknownError, "Could not read screenshot file");
1849 return NULL; 1849 return NULL;
1850 } 1850 }
1851 1851
1852 #if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) 1852 #if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
1853 Error* Session::HeapProfilerDump(const std::string& reason) { 1853 Error* Session::HeapProfilerDump(const std::string& reason) {
1854 // TODO(dmikurube): Support browser processes. 1854 // TODO(dmikurube): Support browser processes.
1855 Error* error = NULL; 1855 Error* error = NULL;
1856 RunSessionTask(base::Bind( 1856 RunSessionTask(base::Bind(
1857 &Automation::HeapProfilerDump, 1857 &Automation::HeapProfilerDump,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 !iter.IsAtEnd(); iter.Advance()) { 1938 !iter.IsAtEnd(); iter.Advance()) {
1939 Error* error = SetPreference(iter.key(), false /* is_user_pref */, 1939 Error* error = SetPreference(iter.key(), false /* is_user_pref */,
1940 iter.value().DeepCopy()); 1940 iter.value().DeepCopy());
1941 if (error) 1941 if (error)
1942 return error; 1942 return error;
1943 } 1943 }
1944 return NULL; 1944 return NULL;
1945 } 1945 }
1946 1946
1947 } // namespace webdriver 1947 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/webdriver_logging.cc ('k') | chrome/test/webdriver/webdriver_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698