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

Side by Side Diff: chrome/browser/sync/test/integration/sync_extension_helper.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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/sync/test/integration/sync_extension_helper.h" 5 #include "chrome/browser/sync/test/integration/sync_extension_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 source.Set(extension_manifest_keys::kPlatformAppBackgroundScripts, 298 source.Set(extension_manifest_keys::kPlatformAppBackgroundScripts,
299 scripts); 299 scripts);
300 break; 300 break;
301 } 301 }
302 default: 302 default:
303 ADD_FAILURE(); 303 ADD_FAILURE();
304 return NULL; 304 return NULL;
305 } 305 }
306 const base::FilePath sub_dir = base::FilePath().AppendASCII(name); 306 const base::FilePath sub_dir = base::FilePath().AppendASCII(name);
307 base::FilePath extension_dir; 307 base::FilePath extension_dir;
308 if (!file_util::PathExists(base_dir) && 308 if (!base::PathExists(base_dir) &&
309 !file_util::CreateDirectory(base_dir)) { 309 !file_util::CreateDirectory(base_dir)) {
310 ADD_FAILURE(); 310 ADD_FAILURE();
311 return NULL; 311 return NULL;
312 } 312 }
313 if (!file_util::CreateTemporaryDirInDir( 313 if (!file_util::CreateTemporaryDirInDir(
314 base_dir, sub_dir.value(), &extension_dir)) { 314 base_dir, sub_dir.value(), &extension_dir)) {
315 ADD_FAILURE(); 315 ADD_FAILURE();
316 return NULL; 316 return NULL;
317 } 317 }
318 std::string error; 318 std::string error;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 EXPECT_EQ(expected_id, extension->id()); 368 EXPECT_EQ(expected_id, extension->id());
369 return NULL; 369 return NULL;
370 } 370 }
371 DVLOG(2) << "created extension with name = " 371 DVLOG(2) << "created extension with name = "
372 << name << ", id = " << expected_id; 372 << name << ", id = " << expected_id;
373 (it->second)[name] = extension; 373 (it->second)[name] = extension;
374 id_to_name_[expected_id] = name; 374 id_to_name_[expected_id] = name;
375 id_to_type_[expected_id] = type; 375 id_to_type_[expected_id] = type;
376 return extension; 376 return extension;
377 } 377 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698