| OLD | NEW |
| 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 "webkit/fileapi/isolated_context.h" | 5 #include "webkit/browser/fileapi/isolated_context.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.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/rand_util.h" | 10 #include "base/rand_util.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "webkit/fileapi/file_system_url.h" | 15 #include "webkit/fileapi/file_system_url.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 uint32 random_data[4]; | 460 uint32 random_data[4]; |
| 461 std::string id; | 461 std::string id; |
| 462 do { | 462 do { |
| 463 base::RandBytes(random_data, sizeof(random_data)); | 463 base::RandBytes(random_data, sizeof(random_data)); |
| 464 id = base::HexEncode(random_data, sizeof(random_data)); | 464 id = base::HexEncode(random_data, sizeof(random_data)); |
| 465 } while (instance_map_.find(id) != instance_map_.end()); | 465 } while (instance_map_.find(id) != instance_map_.end()); |
| 466 return id; | 466 return id; |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace fileapi | 469 } // namespace fileapi |
| OLD | NEW |