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

Side by Side Diff: chrome/browser/profiles/file_path_verifier_win.cc

Issue 1294003002: clang/win: Enable -Wswitch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profiles/file_path_verifier_win.h" 5 #include "chrome/browser/profiles/file_path_verifier_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 case internal::PATH_COMPARISON_FAILED_SAMEBASE: 53 case internal::PATH_COMPARISON_FAILED_SAMEBASE:
54 file_verification_result = was_redirected ? 54 file_verification_result = was_redirected ?
55 FILE_VERIFICATION_FAILED_SAMEBASE_REDIRECT : 55 FILE_VERIFICATION_FAILED_SAMEBASE_REDIRECT :
56 FILE_VERIFICATION_FAILED_SAMEBASE; 56 FILE_VERIFICATION_FAILED_SAMEBASE;
57 break; 57 break;
58 case internal::PATH_COMPARISON_FAILED_SAMEDIR: 58 case internal::PATH_COMPARISON_FAILED_SAMEDIR:
59 file_verification_result = was_redirected ? 59 file_verification_result = was_redirected ?
60 FILE_VERIFICATION_FAILED_SAMEDIR_REDIRECT : 60 FILE_VERIFICATION_FAILED_SAMEDIR_REDIRECT :
61 FILE_VERIFICATION_FAILED_SAMEDIR; 61 FILE_VERIFICATION_FAILED_SAMEDIR;
62 break; 62 break;
63 case internal::PATH_COMPARISON_FAILED_UNKNOWN:
64 // file_verification_result was initialized to the right value above.
65 DCHECK_EQ(FILE_VERIFICATION_FAILED_UNKNOWN, file_verification_result);
66 break;
63 } 67 }
64 } 68 }
65 return file_verification_result; 69 return file_verification_result;
66 } 70 }
67 71
68 } // namespace 72 } // namespace
69 73
70 namespace internal { 74 namespace internal {
71 75
72 PathComparisonReason ComparePathsIgnoreCase(const base::FilePath& path1, 76 PathComparisonReason ComparePathsIgnoreCase(const base::FilePath& path1,
(...skipping 15 matching lines...) Expand all
88 92
89 } // namespace internal 93 } // namespace internal
90 94
91 void VerifyPreferencesFile(const base::FilePath& pref_file_path) { 95 void VerifyPreferencesFile(const base::FilePath& pref_file_path) {
92 FileVerificationResult file_verification_result = 96 FileVerificationResult file_verification_result =
93 VerifyFileAtPath(pref_file_path); 97 VerifyFileAtPath(pref_file_path);
94 UMA_HISTOGRAM_ENUMERATION("Stability.FileAtPath.Preferences", 98 UMA_HISTOGRAM_ENUMERATION("Stability.FileAtPath.Preferences",
95 file_verification_result, 99 file_verification_result,
96 NUM_FILE_VERIFICATION_RESULTS); 100 NUM_FILE_VERIFICATION_RESULTS);
97 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.cc ('k') | chrome/browser/speech/tts_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698