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

Side by Side Diff: chrome/browser/google_apis/test_util.cc

Issue 11418127: Pass calls to GetDocuments through the scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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
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/browser/google_apis/test_util.h" 5 #include "chrome/browser/google_apis/test_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 FilePath path = GetTestFilePath(relative_path); 62 FilePath path = GetTestFilePath(relative_path);
63 63
64 std::string error; 64 std::string error;
65 JSONFileValueSerializer serializer(path); 65 JSONFileValueSerializer serializer(path);
66 scoped_ptr<base::Value> value(serializer.Deserialize(NULL, &error)); 66 scoped_ptr<base::Value> value(serializer.Deserialize(NULL, &error));
67 LOG_IF(WARNING, !value.get()) << "Failed to parse " << path.value() 67 LOG_IF(WARNING, !value.get()) << "Failed to parse " << path.value()
68 << ": " << error; 68 << ": " << error;
69 return value.Pass(); 69 return value.Pass();
70 } 70 }
71 71
72 void CopyResultsFromGetDataCallback(GDataErrorCode* error_out,
73 scoped_ptr<base::Value>* value_out,
74 GDataErrorCode error_in,
75 scoped_ptr<base::Value> value_in) {
76 value_out->swap(value_in);
77 *error_out = error_in;
78 }
79
72 } // namespace test_util 80 } // namespace test_util
73 } // namespace google_apis 81 } // namespace google_apis
OLDNEW
« chrome/browser/google_apis/test_util.h ('K') | « chrome/browser/google_apis/test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698