| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 uint32 random_data[4]; | 421 uint32 random_data[4]; |
| 422 std::string id; | 422 std::string id; |
| 423 do { | 423 do { |
| 424 base::RandBytes(random_data, sizeof(random_data)); | 424 base::RandBytes(random_data, sizeof(random_data)); |
| 425 id = base::HexEncode(random_data, sizeof(random_data)); | 425 id = base::HexEncode(random_data, sizeof(random_data)); |
| 426 } while (instance_map_.find(id) != instance_map_.end()); | 426 } while (instance_map_.find(id) != instance_map_.end()); |
| 427 return id; | 427 return id; |
| 428 } | 428 } |
| 429 | 429 |
| 430 } // namespace fileapi | 430 } // namespace fileapi |
| OLD | NEW |