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

Side by Side Diff: content/browser/indexed_db/indexed_db_browsertest.cc

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows 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
« no previous file with comments | « content/browser/download/save_file_manager.cc ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
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/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 base::FilePath test_data_dir = 236 base::FilePath test_data_dir =
237 GetTestFilePath("indexeddb", test_directory.c_str()).Append(leveldb_dir); 237 GetTestFilePath("indexeddb", test_directory.c_str()).Append(leveldb_dir);
238 IndexedDBContextImpl* context_impl = 238 IndexedDBContextImpl* context_impl =
239 static_cast<IndexedDBContextImpl*>(context.get()); 239 static_cast<IndexedDBContextImpl*>(context.get());
240 base::FilePath dest = context_impl->data_path().Append(leveldb_dir); 240 base::FilePath dest = context_impl->data_path().Append(leveldb_dir);
241 // If we don't create the destination directory first, the contents of the 241 // If we don't create the destination directory first, the contents of the
242 // leveldb directory are copied directly into profile/IndexedDB instead of 242 // leveldb directory are copied directly into profile/IndexedDB instead of
243 // profile/IndexedDB/file__0.xxx/ 243 // profile/IndexedDB/file__0.xxx/
244 ASSERT_TRUE(file_util::CreateDirectory(dest)); 244 ASSERT_TRUE(file_util::CreateDirectory(dest));
245 const bool kRecursive = true; 245 const bool kRecursive = true;
246 ASSERT_TRUE(file_util::CopyDirectory(test_data_dir, 246 ASSERT_TRUE(base::CopyDirectory(test_data_dir,
247 context_impl->data_path(), 247 context_impl->data_path(),
248 kRecursive)); 248 kRecursive));
249 } 249 }
250 250
251 class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest { 251 class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
252 public: 252 public:
253 virtual void SetUpOnMainThread() OVERRIDE { 253 virtual void SetUpOnMainThread() OVERRIDE {
254 scoped_refptr<IndexedDBContextImpl> context = GetContext(); 254 scoped_refptr<IndexedDBContextImpl> context = GetContext();
255 context->TaskRunner()->PostTask( 255 context->TaskRunner()->PostTask(
256 FROM_HERE, 256 FROM_HERE,
257 base::Bind( 257 base::Bind(
258 &CopyLevelDBToProfile, shell(), context, EnclosingLevelDBDir())); 258 &CopyLevelDBToProfile, shell(), context, EnclosingLevelDBDir()));
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); 416 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16);
417 417
418 base::KillProcess( 418 base::KillProcess(
419 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); 419 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true);
420 shell()->Close(); 420 shell()->Close();
421 421
422 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); 422 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
423 } 423 }
424 424
425 } // namespace content 425 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/save_file_manager.cc ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698