| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/devtools/devtools_ui_bindings.h" | 5 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 570 |
| 571 void DevToolsUIBindings::IndexPath(int request_id, | 571 void DevToolsUIBindings::IndexPath(int request_id, |
| 572 int index_request_id, | 572 int index_request_id, |
| 573 const std::string& file_system_path) { | 573 const std::string& file_system_path) { |
| 574 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 574 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 575 CHECK(web_contents_->GetURL().SchemeIs(content::kChromeDevToolsScheme)); | 575 CHECK(web_contents_->GetURL().SchemeIs(content::kChromeDevToolsScheme)); |
| 576 if (!file_helper_->IsFileSystemAdded(file_system_path)) { | 576 if (!file_helper_->IsFileSystemAdded(file_system_path)) { |
| 577 IndexingDone(index_request_id, file_system_path); | 577 IndexingDone(index_request_id, file_system_path); |
| 578 return; | 578 return; |
| 579 } | 579 } |
| 580 if (indexing_jobs_.count(index_request_id) != 0) | |
| 581 return; | |
| 582 indexing_jobs_[index_request_id] = | 580 indexing_jobs_[index_request_id] = |
| 583 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob>( | 581 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob>( |
| 584 file_system_indexer_->IndexPath( | 582 file_system_indexer_->IndexPath( |
| 585 file_system_path, | 583 file_system_path, |
| 586 Bind(&DevToolsUIBindings::IndexingTotalWorkCalculated, | 584 Bind(&DevToolsUIBindings::IndexingTotalWorkCalculated, |
| 587 weak_factory_.GetWeakPtr(), | 585 weak_factory_.GetWeakPtr(), |
| 588 index_request_id, | 586 index_request_id, |
| 589 file_system_path), | 587 file_system_path), |
| 590 Bind(&DevToolsUIBindings::IndexingWorked, | 588 Bind(&DevToolsUIBindings::IndexingWorked, |
| 591 weak_factory_.GetWeakPtr(), | 589 weak_factory_.GetWeakPtr(), |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 if (frontend_loaded_) | 917 if (frontend_loaded_) |
| 920 return; | 918 return; |
| 921 frontend_loaded_ = true; | 919 frontend_loaded_ = true; |
| 922 | 920 |
| 923 // Call delegate first - it seeds importants bit of information. | 921 // Call delegate first - it seeds importants bit of information. |
| 924 delegate_->OnLoadCompleted(); | 922 delegate_->OnLoadCompleted(); |
| 925 | 923 |
| 926 UpdateTheme(); | 924 UpdateTheme(); |
| 927 AddDevToolsExtensionsToClient(); | 925 AddDevToolsExtensionsToClient(); |
| 928 } | 926 } |
| OLD | NEW |